3PO

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.

Install

Click this link to test, or drag to your bookmarks to install

YSlow +3PO

And the code is available in my YSlow fork on Github.

Checks

Here's a the list of checks along with some explanation.

Load 3rd party JS asyncrhonously

Category: Common

Use the JavaScript snippets that load the JS files asynchronously in order to speed up the user experience. Most providers offer you an asynchronous version of the script you're including on your page. If they don't, let them know and meanwhile do it yourself

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

Category: Common

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

Category: Facebook

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

Category: Facebook

The Facebook JS SDK needs an element with id="fb-root". So add this to your page, before you include the Facebook JS SDK

<div id="fb-root">

Include OG (Open Graph) meta tags

Category: Facebook

Open graph tags let you better describe your content. To learn more, see the documentation. And run the tool to validate your page.

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.


Get notification for future posts: follow me on Twitter or subscribe to my RSS feed

40 Responses to “3PO”

  1. Patrick Kettner Says:

    Hey Stoyan,
    That js file is trying to load

    http://localhost/~stoyanstefanov/yslow

  2. Stoyan Says:

    oops, thanks, fixed :)

  3. Three nifty (and free) new performance measurement tools for mobile and third-party content Says:

    [...] 3PO is a handy bookmarklet from Stoyan Stefanov that checks pages for integration with common third-party content, such as analytics and social sharing buttons. True to its claim, it was easy to install by just dragging it to my bookmarks. When I visit a page, one click launches the tool, and it generates a nice little report that not only assigns a letter grade to the page but also gives tips on how to fix issues that it identifies. [...]

  4. Bart Teeuwisse Says:

    Stoyan, it appears that the check for DIV#fb-root returns a false negative. http://wholemedicine.net/ DOES contain this element but 3PO claims it doesn’t.

  5. Three nifty (and free) new performance measurement tools for mobile and third-party content – Ovidiu Donciu: software testing, wordpress websites, social marketing, SEO Says:

    [...] 3PO is a handy bookmarklet from Stoyan Stefanov that checks pages for integration with common third-party content, such as analytics and social sharing buttons. True to its claim, it was easy to install by just dragging it to my bookmarks. When I visit a page, one click launches the tool, and it generates a nice little report that not only assigns a letter grade to the page but also gives tips on how to fix issues that it identifies. [...]

  6. Sid Kumar Says:

    Bart is right. It returns a false negative for my website also. But awesome work, Stoyan! Thanks for making it available.

  7. Andrew Says:

    I added a to my page, but it still throws an error and tells me that it didn’t find a . Also I never included that “Like” button or anything related to FB. The only thing that could be Facebook are the “AddThis” buttons.

  8. Andrew Says:

    Edit: this page doesn’t have a but the tool says it does.

  9. Sunder Says:

    How Can this new ruleset be added to YSlow commandline?

  10. Integrating Stoyans 3PO ruleset to YSlow Commandline « sundergs Says:

    [...] Stoyan Article : http://www.phpied.com/3po/ [...]

  11. YSlow + 3PO: YSlow per gli Oggetti Esterni alle Pagine Says:

    [...] qui potete installare il bookmarklet di YSlow + 3PO, l'autore garantisce la compatibilità con Chrome e Firefox, io l'ho testato sul secondo e va molto [...]

  12. WebPerfDays: Performance Tools | High Performance Web Sites Says:

    [...] SPOF-O-Matic, 3PO for YSlow [...]

  13. 网站性能优化工具 | Javascript | 前端观察 Says:

    [...] SPOF-O-Matic, 3PO for YSlow [...]

  14. 常用的网站性能优化工具 - WEB开发笔记 Says:

    [...] SPOF-O-Matic, 3PO for YSlow [...]

  15. WPO tools « rg443blog Says:

    [...] http://www.phpied.com/3po/ [...]

  16. Performance Calendar » SPOFCheck – Fighting Frontend SPOF at its root Says:

    [...] in a web application. The most notable ones being webpagetest.org, SPOF-O-Matic chrome plugin and YSlow 3PO extension. At eBay we wanted to detect SPOF at a very early stage, during the development cycle [...]

  17. 网站性能优化工具大全 | FED洋洋 Says:

    [...] SPOF-O-Matic, 3PO for YSlow [...]

  18. Early Detection of Frontend Single Points of Failure — eBay Tech Blog Says:

    [...] in a web application, most notably webpagetest.org, the Chrome plugin SPOF-O-Matic, and the YSlow 3PO [...]

  19. HTML5SALON沙龙 Says:

    [...] SPOF-O-Matic, 3PO for YSlow [...]

  20. Improving UX Through Front-End Performance Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  21. Improving UX Through Front-End Performance | Feeds Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  22. Improving UX Through Front-End Performance | Affordable Website Design - Wordpress Website Development Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  23. 网站性能优化工具大全 | 滴洋 Says:

    [...] SPOF-O-Matic, 3PO for YSlow [...]

  24. queue Says:

    I really like your blog.. very nice colors & theme. Did you make this website yourself or did
    you hire someone to do it for you? Plz answer back as I’m looking to create my own blog and would like to know where u got this from. kudos

  25. Improving UX Through Front-End Performance | Void Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  26. Improving UX through front end performance | Codeblock Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  27. Improving UX Through Front End Performance | Lemonade Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  28. cowanfaizalfrancis Says:

    I have fun with, cause I found just what I was having a look for. You have ended my four day long hunt! God Bless you man. Have a nice day. Bye

  29. Improving UX Through Front-End Performance | Webgem Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  30. Improving UX Through Front-End Performance | Vault-34 Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  31. Improving UX Through Front-End Performance | OnTECH Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  32. Improving UX Throught Front-End performance- An A list apart article | iBorg Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  33. Improving UX Through Front End Performance | Zip Stream Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  34. Improving UX Through Front-End Performance | Bee Inspired Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  35. Improving UX Through Front End Performance | DZNR Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  36. Improving UX Through Front-End Performance | LightIT Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  37. Improving UX through front end performance | Rapid Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  38. Improving UX Through Front End Performance | Design To Web Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

  39. web design Says:

    I’ve read several excellent stuff here. Definitely worth bookmarking for revisiting. I surprise how much attempt you put to create this type of wonderful informative site.

  40. Improving UX through front-end experience | Says:

    [...] also recommend the YSlow extension 3PO, which checks your site for integration with popular third-party scripts like Twitter, Facebook, [...]

Leave a Reply