32 ms·
One optimization I do often - don't load the FB scripts until someone actually hovers over an FB like button or share box. 99.9% of the time, they never do. In
by STRML 11y ago
One optimization I do often - don't load the FB scripts until someone actually hovers over an FB like button or share box. 99.9% of the time, they never do. In the meantime, just mock the look of the button. We even mocked the like counts et al by polling FB's API from teh server.
- skosch 11y agoRelated: Heise's Shariff JS. https://github.com/heiseonline/shariff https://github.com/heiseonline/shariff
- redthrowaway 11y agoWhat if they click the button before the script loads?
- tvararu 11y agoIf the buttons are rendered on the client, they won't show up at all before the script loads.
- annnnd 11y agoOf course, there is no hover on mobile, so you are probably optimizing traffic where it is not so critical.