Say hello to the 3PO extension for YSlow. It checks your site for integration with popular 3rd parties, such as Facebook, Twitter widgets, Google Analytics and so on.
3PO (3rd party optimization) extension currently has 5 checks: two of them generic to all 3rd parties and three specific to Facebook plugins. I'm looking forward to adding more checks and more specific to a particular provider's best practices.
The extension is currently available as a bookmarklet, but since YSlow is a platform available on many platforms, it can be built as a Firefox or Chrome extension, command line tool, etc.
Click this link to test, or drag to your bookmarks to install
And the code is available in my YSlow fork on Github.
Here's a the list of checks along with some explanation.
Load 3rd party JS asyncrhonously
If you don't include the script asynchronously, you create a SPOF (Single Point of Failure) and your site effectively goes down when the 3rd party goes down. See for yourself.
Load the 3rd party JS only once
Loading the 3rd party JS files more than once per page is not necessary and slows down the user experience. Sometimes people copy-paste snippets multiple times on the page, e.g. when you have one widget per blog post in a blog post listing. The script only needs to load once and serve multiple widgets.
Define XML namespace
If you use tags like <fb:like> you need to define an XML namespace to make the plugin work in old IE versions. Same for any tag that has
Add an #fb-root element
The Facebook JS SDK needs an element with
id="fb-root". So add this to your page, before you include the Facebook JS SDK
Include OG (Open Graph) meta tags
This entry was posted on Wednesday, June 27th, 2012 and is filed under performance, yslow. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.