Facebook Overhauls Like Box, Claims Plugin Is Now Two To Four Times Faster

Developers like speed, and Facebook obliged by revamping its like box, saying in a note on the Facebook Engineering page that the plugin is now two to four times faster after being rebuilt from the ground up.

The social network offered more details on how it was able to boost the performance of its like box:

  • New, smaller components: The plugin is made of little components (box, buttons, etc.), and we’ve simplified and cleaned those up to use fewer bytes in HTML markup and CSS. The total CSS is reduced to the point of being small enough to go in the HTML as a style tag. This may seem controversial (external stylesheets can be cached, inline styles cannot), but in our experiments, we’ve seen that it’s better to have the (small amount of) CSS inline. Otherwise the browsers block the rendering of the page, waiting for yet another HTTP request to complete.
  • Reduced overall JavaScript size.
  • Better JavaScript packaging: We now have only one JavaScript to load with a single HTTP request.
  • Asynchronous non-blocking JavaScript loading.
  • Perceived performance: Inline CSS and non-blocking JavaScript make the first browser paint happen faster. This helps deliver the first impression to the user faster. The rest (handling clicks and showing the page stream) can wait.
Related Stories
Mediabistro Course

Content Marketing 101

Content Marketing 101Almost 60% of businesses use some form of content marketing. Starting December 8, get hands-on content marketing training in our online boot camp! Through an interactive series of webcasts, content and marketing experts will teach you how to create, distribute, and measure the success of your brand's content. Sign-up before November 10 to get $50 OFF with early bird pricing. Register now!