Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Improve performance of Like button #8195

Open gravityrail opened 7 years ago

gravityrail commented 7 years ago

Steps to reproduce the issue

What I expected

What happened instead

Why?

A bunch of reasons:

How should we fix?

I think a first pass to eliminate some of these extra requests for dependencies would help a lot. Inlining the button style, replacing jquery with a minimal set of polyfills and functions for ajax, finding elements via selectors, jQuery.inArray() would reduce the number of requests, and the bytes requested.

A second pass could eliminate the button iframe entirely, perhaps using the Shadow DOM API or similar to sandbox the button styles from the page.

https://developers.google.com/web/fundamentals/web-components/shadowdom

beaulebens commented 6 years ago

Has this changed with the performance improvements that were shipped on the WP.com side recently?

stale[bot] commented 6 years ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.