tl;dr: Add data-lazy=”true” to your Facebook social plugins that are below the fold and reap the benefits. In code: // before <div class=”fb-like” data-href=”https://phpied.com”></div> // after <div class=”fb-like” data-href=”https://phpied.com” data-lazy=”true”></div> The following 18 seconds video demonstrates the difference. Where currently your visitors load Facebook iframe content even if it’s way down the page, after you […]
Archive for the 'facebook' Category
f8 2015
Mar 31st, 2015So I spoke at Facebook’s F8 in San Francisco last week. Actually my teammate Varun spoke mostly, I just interrupted a few times. Among other things we announced a new plugin – the embedded video player, so now you can embed any public FB video on your site. And, how meta!, below is a video […]
Remarkable React
Aug 26th, 2013I gave a talk about React at BrazilJS few days ago. The “slides” are here. In this post I’ll go over what I said (more or less) at the beginning of the presentation. I hope to follow up with some more code. Disclaimer: I work at Facebook. But these are my thoughts. In fact, I […]
Here’s to a faster Recommendations plugin
May 5th, 2013So I’ve been part of the quest of making all Facebook social plugins faster, even if it means rewriting them from scratch. After the Send plugin, Like button (perf optimizations described here), Follow plugin, Facepile and Likebox (perf details here), now you have a faster Recommendations plugin. The techniques used to make it faster are […]
C3PO: Common 3rd-party objects
Feb 18th, 2013Problem: too much JavaScript in your page to handle 3rd party widgets (e.g. Like buttons) Possible solution: a common piece of JavaScript to handle all third parties’ needs What JavaScript? If you’ve read the previous post, you see that the most features in a third party widget are possible only if you inject JavaScript from […]
Social button BFFs
Sep 27th, 2011TL;DR: Loading JavaScript asynchronously is critical for the performance of your web app. Below is an idea how to do it for the most common social buttons out there so you can make sure these don’t interfere with the loading of the rest of your content. After all people need to see your content first, […]
Performance job offers
Jan 28th, 2010I’m sure quite a few of you my fellow readers are crazy about web performance. And if you’re seeking new challenges, timing can’t be any better. Below are three excellent opportunities in three of the most high-traffic sites on the planet. Yahoo! Search is hiring a senior performance engineer. Yep, you’ll be working with me […]
LA Web devs meetup at Yahoo
Jul 23rd, 2007So there is this group of local LA web developers that meet every month or so to meet and discuss what’s up. More about/join the group here. This month Yahoo will be hosting the meetup in the Santa Monica office (my workplace), it’s actually tomorrow, so if you’re in LA, don’t miss the opportunity for […]