SlideShare a Scribd company logo
THIRD PARTY PERFORMANCE

Guy Podjarny (@guypod)
CTO, Web Experience, Akamai

Faster ForwardTM

©2013 Akamai
What’s a third party?

- Not a 1st Party?
- Infrastructure & code managed by someone else
- What’s not a 3rd party:
-

Reused Software (e.g. jQuery, Apache) – premium or free
Commercial Hardware (e.g. ADC, WAF)
Cloud Provider (e.g. AWS)
CDN (e.g. Akamai)

Faster ForwardTM

©2013 Akamai
Where are the third parties?

- A tag on the page
- Analytics/trackers - invisible
- Image Tags & Scripts
- Non-critical page components (e.g. Share buttons, Get feedback…)
- Critical Page Components (A/B Testing, Shopping Cart
Personalization, Ads(?)..)

- An inline Cloud proxy (e.g. MotionPoint, SiteSpect)

Faster ForwardTM

©2013 Akamai
# Domains Per Page

Sep 2013 Percentiles:
- 25th : 4 domains
- 50th : 10 domains
- 75th : 21 domains
- 90th : 36 domains

Faster ForwardTM

©2013 Akamai
Ghostery Data - Media

Faster ForwardTM

©2013 Akamai
Ghostery Data - Retail

Faster ForwardTM

©2013 Akamai
3rd Party Extravaganza!

Faster ForwardTM

©2013 Akamai
Why Should you Care? (from a performance perspective)

- Single Point of Failure – SPOF
- Scripts block rendering of everything below them

- Delayed load event
- Users see progress indicators for longer
- Other deferred actions get delayed - e.g. $.ready(myfunc)

- Delayed 1st party scripts
- Resource Contention
- Battery Consumption (on mobile)

Faster ForwardTM

©2013 Akamai
SPOF
Home Page, Optimizely & Truste Down

Business Week, Truste Down

Faster ForwardTM

22 Secs

45 Secs

22 Secs

©2013 Akamai
SPOF – Not Only Your Homepage

Category Page, BazaarVoice down

Faster ForwardTM

23 Secs

©2013 Akamai
The 1st Party Arsenal

- Async
- Delay onload (async att) vs don’t delay onload (IFrame)

- Defer Execution
- Defer Download
- Remove Tag

Faster ForwardTM

©2013 Akamai
Analytics & Beacons

- Goal: Async without delaying onload
- Shouldn’t delay visible content
- Defer not great since it’s likely to miss users

Faster ForwardTM

©2013 Akamai
Beacons that don’t delay onload

Faster ForwardTM

©2013 Akamai
Beacons that don’t delay onload

Faster ForwardTM

©2013 Akamai
Works for Images Too!

Faster ForwardTM

©2013 Akamai
Analytics & Beacons

- Goal: Async without delaying onload
- Shouldn’t delay visible content
- Defer not great since it’s likely to miss users

- Technique: Dynamically generated IFrame
- Only works if no page manipulation is required

- Catches and what can you do about them
- Inline & external script relationships
- Event registration

Faster ForwardTM

©2013 Akamai
External Script

Cringe…

Dependent Inline Script
Further Dependent
External Script

Further down
dependent
inline script
Faster ForwardTM

©2013 Akamai
Run “inline” script at onload

Slight Snag…
But you catch my drift…
Don’t forget this one!
(combine all dependents to
avoid race condition bugs)

Faster ForwardTM

©2013 Akamai
FYI: Omniture Workarounds

Faster ForwardTM

©2013 Akamai
Beacon API – Draft W3C Spec

Faster ForwardTM

©2013 Akamai
Non-Critical Page Components

- Goal: Defer Download
- If they’re not critical, they shouldn’t content with the rest

Faster ForwardTM

©2013 Akamai
Defer Download Example

Faster ForwardTM

©2013 Akamai
Defer Download Example

Faster ForwardTM

©2013 Akamai
Non-Critical Page Components

- Goal: Defer Download
- If they’re not critical, they shouldn’t content with the rest

- Catches and what can you do about them
-

Event registration
Inline & external script relationships
document.write()
Execution order

Faster ForwardTM

©2013 Akamai
Nullify document.write()

Faster ForwardTM

©2013 Akamai
Resource Priorities

Faster ForwardTM

©2013 Akamai
Critical Page Components

- Methodology: Async with blocking onload
- Keep 3rd parties from blocking 1st party content
- Delay onload as page not complete until component is loaded

Faster ForwardTM

©2013 Akamai
Async with blocking onload

Faster ForwardTM

©2013 Akamai
Critical Page Components

- Methodology: Async with blocking onload
- Keep 3rd parties from blocking 1st party content
- Delay onload as page not complete until component is loaded

- Catches and what can you do about them
-

Event registration
Inline & external script relationships
document.write()
Execution order

Faster ForwardTM

©2013 Akamai
Async scripts with Execution Order

Faster ForwardTM

©2013 Akamai
Interim Summary

- Analytics/Beacons – Async without delaying onload
- Non-Critical Widgets – Defer Download (and Execution)
- Critical Widgets – Async with delaying onload

Faster ForwardTM

©2013 Akamai
Resource Timing Opt-In

Ask Require All your 3rd Party Vendors to add this header!
-

Unless they give you a REALLY good privacy reason not to.

Faster ForwardTM

©2013 Akamai
3rd Party Checklist – Work in Progress…

@bentlegen

@igrigorik

@bbinto

@guypod
Faster ForwardTM

@triblondon

Kyle Kinnaman
©2013 Akamai
Summary

- 3rd Party tags are a part of our reality…
- Pick your strategies:
- Analytics/Beacons – Async without delaying onload
- Non-Critical Widgets – Defer Download (and Execution)
- Critical Widgets – Async with delaying onload

- Track the Beacon & Resource Priorities Specs
- Challenge your 3rd party vendors on their perf & availability

Faster ForwardTM

©2013 Akamai

More Related Content

PPTX
Third party-performance (Airbnb Nerds, Nov 2013)
PPTX
Chicago Tech Day Jan 2015: Hidden Features
PDF
2017 Silicon Valley Code Camp: Instant Mobile Web
PPTX
Third Party Performance (Velocity, 2014)
PPTX
Continuous Deployment
PDF
Article published (by EHAI) on demonstration of Sustainability in Nicaragu by...
PDF
Discover how Adidas is using data science to deliver third-party governance
PDF
Edge 2016 service workers and other front end techniques
Third party-performance (Airbnb Nerds, Nov 2013)
Chicago Tech Day Jan 2015: Hidden Features
2017 Silicon Valley Code Camp: Instant Mobile Web
Third Party Performance (Velocity, 2014)
Continuous Deployment
Article published (by EHAI) on demonstration of Sustainability in Nicaragu by...
Discover how Adidas is using data science to deliver third-party governance
Edge 2016 service workers and other front end techniques

Similar to Third Party Performance (20)

PDF
DIY Website Performance - Akamai Toronto Tech Day 2015
PPTX
UI5 with Akamai - Introduction to the Content Delivery Network
PDF
Edge 2016 automating h2 push
PDF
Edge 2016 measuring what matters
PDF
Measuring what matters
PPTX
Akamai internet insights
PDF
Edge 2016 h2 in the real world
PDF
Akamai Korea - Tech Day (2015/03/11) HTTP/2
PPTX
Akamai: From Theory to Practice
PDF
Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)
PDF
Site Managing Performance
PPTX
App-solute Testing: Making App Testing with Akamai Easy
PDF
ウェブサイト最適化101 - 正しく測ろうあなたのサイト -
PPTX
Cloud Delivery: The Path from Simple to Sophisticated
PDF
AMP - SMX München 2018
PPTX
Real User Measurement Insights, NYWebPerf 2018-Aug-09
PPTX
Common Traits of High Performing Websites, WebPerfDays Amsterdam 07-Nov-2018
PDF
Edge 2016 what slows you down - your network or your device
PDF
PPTX
i-PANDAWA - SCRUM AGILE - Technology Deep Dive and Standard Operational Proce...
DIY Website Performance - Akamai Toronto Tech Day 2015
UI5 with Akamai - Introduction to the Content Delivery Network
Edge 2016 automating h2 push
Edge 2016 measuring what matters
Measuring what matters
Akamai internet insights
Edge 2016 h2 in the real world
Akamai Korea - Tech Day (2015/03/11) HTTP/2
Akamai: From Theory to Practice
Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)
Site Managing Performance
App-solute Testing: Making App Testing with Akamai Easy
ウェブサイト最適化101 - 正しく測ろうあなたのサイト -
Cloud Delivery: The Path from Simple to Sophisticated
AMP - SMX München 2018
Real User Measurement Insights, NYWebPerf 2018-Aug-09
Common Traits of High Performing Websites, WebPerfDays Amsterdam 07-Nov-2018
Edge 2016 what slows you down - your network or your device
i-PANDAWA - SCRUM AGILE - Technology Deep Dive and Standard Operational Proce...
Ad

More from Guy Podjarny (20)

PDF
Serverless Security: What's Left To Protect
PDF
Securing Serverless - By Breaking In
PDF
Serverless Security: What's Left to Protect?
PDF
Secure Node Code (workshop, O'Reilly Security)
PDF
Stranger Danger (NodeSummit, 2016)
PDF
Stranger Danger: Securing Third Party Components (Tech2020)
PDF
High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)
PDF
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
PDF
High Performance Images: Beautiful Shouldn't Mean Slow
PDF
Responsive In The Wild, 2014
PPTX
Rules driven-delivery
PPTX
Responsive In The Wild (SmashingConf, 2014)
PPTX
Putting Your Images on a Diet (SmashingConf, 2014)
PDF
A Picture Costs A Thousand Words
PPTX
Step by Step Mobile Optimization
PPTX
Quantifying The Mobile Difference
PPTX
Performance Implications of Mobile Design (Perf Audience Edition)
PPTX
Performance Implications of Mobile Design
PDF
Unravelling Mobile Web Performance
PPTX
State Of Mobile Web Performance
Serverless Security: What's Left To Protect
Securing Serverless - By Breaking In
Serverless Security: What's Left to Protect?
Secure Node Code (workshop, O'Reilly Security)
Stranger Danger (NodeSummit, 2016)
Stranger Danger: Securing Third Party Components (Tech2020)
High Performance Images: Beautiful Shouldn't Mean Slow (Velocity EU 2015)
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
High Performance Images: Beautiful Shouldn't Mean Slow
Responsive In The Wild, 2014
Rules driven-delivery
Responsive In The Wild (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)
A Picture Costs A Thousand Words
Step by Step Mobile Optimization
Quantifying The Mobile Difference
Performance Implications of Mobile Design (Perf Audience Edition)
Performance Implications of Mobile Design
Unravelling Mobile Web Performance
State Of Mobile Web Performance
Ad

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Machine Learning_overview_presentation.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Getting Started with Data Integration: FME Form 101
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Per capita expenditure prediction using model stacking based on satellite ima...
Assigned Numbers - 2025 - Bluetooth® Document
SOPHOS-XG Firewall Administrator PPT.pptx
Encapsulation_ Review paper, used for researhc scholars
Machine Learning_overview_presentation.pptx
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Weekly Chronicles - August'25-Week II
Getting Started with Data Integration: FME Form 101
Building Integrated photovoltaic BIPV_UPV.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...

Third Party Performance

  • 1. THIRD PARTY PERFORMANCE Guy Podjarny (@guypod) CTO, Web Experience, Akamai Faster ForwardTM ©2013 Akamai
  • 2. What’s a third party? - Not a 1st Party? - Infrastructure & code managed by someone else - What’s not a 3rd party: - Reused Software (e.g. jQuery, Apache) – premium or free Commercial Hardware (e.g. ADC, WAF) Cloud Provider (e.g. AWS) CDN (e.g. Akamai) Faster ForwardTM ©2013 Akamai
  • 3. Where are the third parties? - A tag on the page - Analytics/trackers - invisible - Image Tags & Scripts - Non-critical page components (e.g. Share buttons, Get feedback…) - Critical Page Components (A/B Testing, Shopping Cart Personalization, Ads(?)..) - An inline Cloud proxy (e.g. MotionPoint, SiteSpect) Faster ForwardTM ©2013 Akamai
  • 4. # Domains Per Page Sep 2013 Percentiles: - 25th : 4 domains - 50th : 10 domains - 75th : 21 domains - 90th : 36 domains Faster ForwardTM ©2013 Akamai
  • 5. Ghostery Data - Media Faster ForwardTM ©2013 Akamai
  • 6. Ghostery Data - Retail Faster ForwardTM ©2013 Akamai
  • 7. 3rd Party Extravaganza! Faster ForwardTM ©2013 Akamai
  • 8. Why Should you Care? (from a performance perspective) - Single Point of Failure – SPOF - Scripts block rendering of everything below them - Delayed load event - Users see progress indicators for longer - Other deferred actions get delayed - e.g. $.ready(myfunc) - Delayed 1st party scripts - Resource Contention - Battery Consumption (on mobile) Faster ForwardTM ©2013 Akamai
  • 9. SPOF Home Page, Optimizely & Truste Down Business Week, Truste Down Faster ForwardTM 22 Secs 45 Secs 22 Secs ©2013 Akamai
  • 10. SPOF – Not Only Your Homepage Category Page, BazaarVoice down Faster ForwardTM 23 Secs ©2013 Akamai
  • 11. The 1st Party Arsenal - Async - Delay onload (async att) vs don’t delay onload (IFrame) - Defer Execution - Defer Download - Remove Tag Faster ForwardTM ©2013 Akamai
  • 12. Analytics & Beacons - Goal: Async without delaying onload - Shouldn’t delay visible content - Defer not great since it’s likely to miss users Faster ForwardTM ©2013 Akamai
  • 13. Beacons that don’t delay onload Faster ForwardTM ©2013 Akamai
  • 14. Beacons that don’t delay onload Faster ForwardTM ©2013 Akamai
  • 15. Works for Images Too! Faster ForwardTM ©2013 Akamai
  • 16. Analytics & Beacons - Goal: Async without delaying onload - Shouldn’t delay visible content - Defer not great since it’s likely to miss users - Technique: Dynamically generated IFrame - Only works if no page manipulation is required - Catches and what can you do about them - Inline & external script relationships - Event registration Faster ForwardTM ©2013 Akamai
  • 17. External Script Cringe… Dependent Inline Script Further Dependent External Script Further down dependent inline script Faster ForwardTM ©2013 Akamai
  • 18. Run “inline” script at onload Slight Snag… But you catch my drift… Don’t forget this one! (combine all dependents to avoid race condition bugs) Faster ForwardTM ©2013 Akamai
  • 19. FYI: Omniture Workarounds Faster ForwardTM ©2013 Akamai
  • 20. Beacon API – Draft W3C Spec Faster ForwardTM ©2013 Akamai
  • 21. Non-Critical Page Components - Goal: Defer Download - If they’re not critical, they shouldn’t content with the rest Faster ForwardTM ©2013 Akamai
  • 22. Defer Download Example Faster ForwardTM ©2013 Akamai
  • 23. Defer Download Example Faster ForwardTM ©2013 Akamai
  • 24. Non-Critical Page Components - Goal: Defer Download - If they’re not critical, they shouldn’t content with the rest - Catches and what can you do about them - Event registration Inline & external script relationships document.write() Execution order Faster ForwardTM ©2013 Akamai
  • 27. Critical Page Components - Methodology: Async with blocking onload - Keep 3rd parties from blocking 1st party content - Delay onload as page not complete until component is loaded Faster ForwardTM ©2013 Akamai
  • 28. Async with blocking onload Faster ForwardTM ©2013 Akamai
  • 29. Critical Page Components - Methodology: Async with blocking onload - Keep 3rd parties from blocking 1st party content - Delay onload as page not complete until component is loaded - Catches and what can you do about them - Event registration Inline & external script relationships document.write() Execution order Faster ForwardTM ©2013 Akamai
  • 30. Async scripts with Execution Order Faster ForwardTM ©2013 Akamai
  • 31. Interim Summary - Analytics/Beacons – Async without delaying onload - Non-Critical Widgets – Defer Download (and Execution) - Critical Widgets – Async with delaying onload Faster ForwardTM ©2013 Akamai
  • 32. Resource Timing Opt-In Ask Require All your 3rd Party Vendors to add this header! - Unless they give you a REALLY good privacy reason not to. Faster ForwardTM ©2013 Akamai
  • 33. 3rd Party Checklist – Work in Progress… @bentlegen @igrigorik @bbinto @guypod Faster ForwardTM @triblondon Kyle Kinnaman ©2013 Akamai
  • 34. Summary - 3rd Party tags are a part of our reality… - Pick your strategies: - Analytics/Beacons – Async without delaying onload - Non-Critical Widgets – Defer Download (and Execution) - Critical Widgets – Async with delaying onload - Track the Beacon & Resource Priorities Specs - Challenge your 3rd party vendors on their perf & availability Faster ForwardTM ©2013 Akamai

Editor's Notes

  • #10: http://www.webpagetest.org/video/compare.php?tests=131014_TS_61a4bc3ecbd8a4d1b84e6d3cbf397a3b%2C131014_YR_d9dc75ab1c43d635a8b5d072d92c5830&thumbSize=200&ival=1000&end=visual
  • #11: http://www.webpagetest.org/video/compare.php?tests=131014_DB_563f7c9daf8cbac69641778c7e433764%2C131014_6N_d2f5c727727583b8c4404c8777e60a2a&thumbSize=200&ival=1000&end=visual&font=9
  • #14: <script>(function(url,tag){variframe = document.createElement('iframe'); (iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";var where = document.getElementsByTagName('script'); where = where[where.length - 1];where.parentNode.insertBefore(iframe, where);var doc = iframe.contentWindow.document;doc.open().write('<body onload="'+ 'varjs = document.createElement(\''+tag+'\');'+ 'js.src = \''+ url +'\';'+ 'document.body.appendChild(js);">');doc.close();})('http://3party.com/widget.js','img');</script>
  • #15: <script>(function(url,tag){variframe = document.createElement('iframe'); (iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";var where = document.getElementsByTagName('script'); where = where[where.length - 1];where.parentNode.insertBefore(iframe, where);var doc = iframe.contentWindow.document;doc.open().write('<body onload="'+ 'varjs = document.createElement(\''+tag+'\');'+ 'js.src = \''+ url +'\';'+ 'document.body.appendChild(js);">');doc.close();})('http://3party.com/widget.js','img');</script>