SlideShare a Scribd company logo
1 of 102
Download to read offline
Third Party Footprint 
Barbara Bermes
#velocityconf 
3RD PARTY FOOTPRINT 
EVALUATING THE PERFORMANCE OF EXTERNAL SCRIPTS 
BARBARA BERMES | @BBINTO
#velocityconf 
I LIVE IN TORONTO, CANADA
#velocityconf 
I LOVE BURRITOS 
#VELOCITYBURRITO
#velocityconf 
I’M PASSIONATE ABOUT WEB PERF
#velocityconf 
LET’S GET THIS PARTY STARTED
“In the strictest sense, anything served to the 
client that’s provided by an organization that’s 
not the website provider is considered to be 
#velocityconf 
third-party” 
–Ben Vinegar, Author of “Third-Party Script”
#velocityconf 
TYPES OF 3RD PARTY SCRIPTS 
Advertising 
Tracking and Analytics 
Fonts 
Social Media 
Libraries and Frameworks
#velocityconf 
WHAT’S THE #1 USED 3RD PARTY SCRIPT?
#velocityconf 
STATS FROM BIG QUERY
#velocityconf 
STATS FROM BIG QUERY 
Google Facebook Twitter 
16% 
22% 
62%
DISTRIBUTION OF 3RD PARTY SCRIPTS VS. 1ST PARTY 
#velocityconf 
31% 34.5% 38% 
32% 
36% 
38% 
2011 2013 2014 
Source: http://bigqueri.es/t/what-is-the-distribution-of-1st-party-vs-3rd-party-resources/100 
Percentage
#velocityconf 
VISUALIZE THE IMPACT OF 
3RD PARTY SCRIPTS
#velocityconf
#velocityconf
#velocityconf
#velocityconf 
FOREIGN CONTENT OVERLOAD!
#velocityconf 
EXAMPLE: WIRED
#velocityconf 
BUT WHAT’S THE ISSUE?
#velocityconf 
THE ISSUES AND NEGATIVE IMPACTS 
Performance 
Front-end Single Point of Failure (SPOF) 
Privacy
#velocityconf 
POTENTIAL SOLUTIONS 
Safe Snippets 
Caching and Hosted Libraries 
Tools and Initiatives
#velocityconf 
PERFORMANCE
#velocityconf 
RULE OF THUMB 
The value you get out of the widget needs to be 
greater than the performance hit you are taking 
value(widget) > perf_hit(widget) 
- John Hjelmstad 
Google I/O 2012 (How we Make JavaScript Widgets Scream)
#velocityconf 
PERCEPTION OF PROMOTIONAL SPACE 
A user who has to endure an 8-second download delay 
spends only 1% of their total viewing time looking at the 
featured promotional space on a landing page. 
In contrast, a user who receives instantaneous page rendering 
spends 20% of viewing time within the promotional area 
(source: Jakob Nielsen)
#velocityconf 
A WEBSITE WITHOUT ADS???
#velocityconf 
THE PERFORMANCE IMPACT OF ADS
40% 
#velocityconf 
Using no (client-side) ad code reduced 
CBC’s page load time by 40% 
<script/>
#velocityconf 
MONITOR FOREIGN CONTENT. 
CONSTANTLY!
10 
7.5 
BAD 3RD PARTIES (CBC TOUCH SITE) 
Client-side Ads 
We noticed a spike 
s 
in Mean Arithmetic 5 
Smooth sailing 
Ads turned off Server-side Ads 
2.5 
Source: Keynote Daily Reports 
0 
10/4/12 10/31/12 
#velocityconf
#velocityconf 
SINGLE POINT OF FAILURE
A single point of failure (SPOF) is a part of a system that, if 
#velocityconf 
it fails, will stop the entire system from working 
–Wikipedia
#velocityconf 
THE OFFENDER 
It will block rendering anything after this line
#velocityconf 
YEAH….WHATEVER 
3RD PROVIDERS 
DON’T REALLY GO DOWN…
#velocityconf 
OH YES. THEY DO!
#velocityconf
#velocityconf
#velocityconf
#velocityconf
#velocityconf
#velocityconf
#velocityconf
#velocityconf
#velocityconf 
THE GREAT FIREWALL OF CHINA
#velocityconf 
SIMULATING SPOF ON TECHCRUNCH
#velocityconf
#velocityconf 
SPOF-O-Matic
#velocityconf
#velocityconf 
SPOF WIRED 
Without SPOF With SPOF: Visually complete 40s
#velocityconf 
LET’S CRASH THE PARTY
#velocityconf
#velocityconf
#velocityconf
#velocityconf
#velocityconf 
INITIALIZING CLIENT-SIDE SCRIPTS
#velocityconf 
SAFEST (PREVIOUS) WAY: 
DYNAMIC SCRIPT TAG 
(to cover most of the browsers)
#velocityconf 
ASYNCHRONOUS LOADING 
http://www.phpied.com/social-button-bffs/
#velocityconf 
ASYNCHRONOUS LOADING
#velocityconf 
ASYNCHRONOUS LOADING
#velocityconf 
ASYNCHRONOUS LOADING
#velocityconf 
ASYNCHRONOUS LOADING
#velocityconf 
ASYNCHRONOUS LOADING
#velocityconf 
ASYNCHRONOUS LOADING
#velocityconf 
BEFORE
#velocityconf 
5 seconds 25 seconds
#velocityconf 
AFTER
#velocityconf 
AFTER 
5 seconds
#velocityconf
#velocityconf 
THE FUTURE
#velocityconf 
ASYNC OR DEFER JS
#velocityconf 
ASYNC OR DEFER JS
#velocityconf 
ASYNC AND DEFER JS 
//suggested by W3C
PROTECT YOURSELF WITH THE HELP OF TOOLS 
#velocityconf 
Ad-hoc browser tools 
Continuous integration & deployment tools
#velocityconf 
CACHING? 
Don’t always rely on it!
#velocityconf 
CACHE POLICIES 
30min. 
20 min 
3 min 
1 hr 
12 hrs 
no cache 
30 min 
1 hr 
336 hrs
#velocityconf 
WHAT ABOUT HOSTED LIBRARIES?
#velocityconf 
GOOGLE HOSTED LIBRARIES 
Pages using Google CDN 
(Top Alexa Websites) 
0.4% 
0.2% 
0% 
11% 
17% 
26% 
37% 
Jan '11 Jan '13 Jan '13 Jan '14 
Percentage
#velocityconf 
DON’T JUST COPY AND PASTE 
Anywhere?
#velocityconf 
SPOF ALERT
#velocityconf 
DON’T DO THIS….
#velocityconf 
RATHER DO THIS: SILENTLY FAIL
GOOGLE’S HOSTED JQUERY FRAGMENTATION 
Source: Aug 2014, Big Query result on jQuery from Google CDNs 
#velocityconf
#velocityconf 
SO, WHATS THE VERDICT: 
HOSTED LIBRARIES OR NOT?
#velocityconf 
PRIVACY
https://developers.facebook.com/docs/plugins/like-button/ 
#velocityconf
#velocityconf 
What they don’t really tell you that they maybe…. 
track the visited website, your IP, and more….???? 
Did you agree to that?
#velocityconf 
OPEN SOURCE INITIATIVES 
AND RESOURCES
#velocityconf 
PRIVACY HERO 
HEISE’S OPT-IN SOLUTION
#velocityconf
#velocityconf 
3RD PARTY PERF HEROES 
PHILIP TELLIS & STOYAN STEFANOV
#velocityconf
#velocityconf 
MEASURING 
3RD PARTY CONTENT ON YOUR SITE 
Navigation timing API 
Resource timing API
ADOPTION OF TIMING-ALLOW-ORIGIN HEADER 
#velocityconf 
170 
85 
0 
(TOP ALEX WEBSITES) 
Facebook Google 
Akamai Disqus Typekit 
82 86 86 
99 
130 
157 
168 
Optimizely 
Cedexis Twitter 
CDNPlanet Walmart 
Jan '14 Feb '14 Mar '14 Apr '14 May '14 Jun '14 Jul '14
#velocityconf 
JSMANNERS
#velocityconf
#velocityconf 
CONTRIBUTE ON GITHUB! 
https://github.com/triblondon/thirdpartysla
#velocityconf 
NEXT TIME BEFORE YOU COPY AND PASTE
WHAT TO DO AS A PUBLISHER & DEVELOPER 
#velocityconf 
• Refuse 3rd party content that doesn’t provide async options or is not minified 
• Put the risk in the SLA (uptime etc.) 
• Review jsmanners 
• Educate other (junior) developers 
• Test it via navigation and resource timing where applicable
WHAT TO DO AS A PUBLISHER & DEVELOPER 
#velocityconf 
• Ask for server-side options 
• Evaluate tag managers 
• Investigate hosted libraries (if no own CDN is available) 
• Monitor, monitor, ….and monitor 
• Evaluate the need of the script with marketing and sales
#velocityconf 
WHAT TO DO AS A SCRIPT PROVIDER 
• Provide non-blocking code samples and snippets 
• Educate developers and verify the integration of your script (proof-check)
#velocityconf 
THE PARTY’S OVER 
THANK YOU
QUESTIONS? 
SHAMELESS PLUG I’m writing a book: Lean Websites (SitePoint) 
VELOCITY OFFICE HOUR 2pm Table 1 (Sponsor Pavilion) 
#velocityconf 
bit.ly/velocityconf14-3rdparty
#velocityconf 
BUT WHEN TO USE WHAT NOW?

More Related Content

What's hot

What's hot (7)

WP REST API
WP REST APIWP REST API
WP REST API
 
BuddyPress v4
BuddyPress v4BuddyPress v4
BuddyPress v4
 
Content Strategy Triage: Who lives? Who dies? Who do you fight to save?
Content Strategy Triage: Who lives? Who dies? Who do you fight to save?Content Strategy Triage: Who lives? Who dies? Who do you fight to save?
Content Strategy Triage: Who lives? Who dies? Who do you fight to save?
 
Sistrix - SEO Do's and Don't
Sistrix - SEO Do's and Don'tSistrix - SEO Do's and Don't
Sistrix - SEO Do's and Don't
 
Rachel meyer sfima 2017
Rachel meyer sfima 2017Rachel meyer sfima 2017
Rachel meyer sfima 2017
 
The Nuts and Bolts of Twitter
The Nuts and Bolts of TwitterThe Nuts and Bolts of Twitter
The Nuts and Bolts of Twitter
 
WordPress is advancing rAPIdly - WordCamp San Antonio 2015
WordPress is advancing rAPIdly - WordCamp San Antonio 2015WordPress is advancing rAPIdly - WordCamp San Antonio 2015
WordPress is advancing rAPIdly - WordCamp San Antonio 2015
 

Similar to Third Party Footprint: Evaluating the Performance of External Scripts

30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster
QA or the Highway
 
The Canadian Public Broadcaster on a Diet: Slimming Down for a Whole Nation
The Canadian Public Broadcaster on a Diet: Slimming Down for a Whole NationThe Canadian Public Broadcaster on a Diet: Slimming Down for a Whole Nation
The Canadian Public Broadcaster on a Diet: Slimming Down for a Whole Nation
Blake Crosby
 

Similar to Third Party Footprint: Evaluating the Performance of External Scripts (20)

How to pass a coding interview as an automation developer talk - Oct 17 2016
How to pass a coding interview as an automation developer talk - Oct 17 2016How to pass a coding interview as an automation developer talk - Oct 17 2016
How to pass a coding interview as an automation developer talk - Oct 17 2016
 
LIve Landing Page Audit
LIve Landing Page AuditLIve Landing Page Audit
LIve Landing Page Audit
 
Web Performance the base for DevOps?! - Webperf Meetup Atlanta
Web Performance the base for DevOps?! - Webperf Meetup AtlantaWeb Performance the base for DevOps?! - Webperf Meetup Atlanta
Web Performance the base for DevOps?! - Webperf Meetup Atlanta
 
Demand Attention Now! Create Your Visual Moment of Truth
Demand Attention Now!  Create Your Visual Moment of TruthDemand Attention Now!  Create Your Visual Moment of Truth
Demand Attention Now! Create Your Visual Moment of Truth
 
Solving Thin Content
Solving Thin ContentSolving Thin Content
Solving Thin Content
 
#pubcon - Solving for Thin Content
#pubcon - Solving for Thin Content#pubcon - Solving for Thin Content
#pubcon - Solving for Thin Content
 
30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster30 of the best free software test tools in 60 minutes by Jess Lancaster
30 of the best free software test tools in 60 minutes by Jess Lancaster
 
Google Tag Manager - Introduction & Implementation
Google Tag Manager - Introduction & ImplementationGoogle Tag Manager - Introduction & Implementation
Google Tag Manager - Introduction & Implementation
 
The Canadian Public Broadcaster on a Diet: Slimming down for a whole nation
The Canadian Public Broadcaster on a Diet: Slimming down for a whole nationThe Canadian Public Broadcaster on a Diet: Slimming down for a whole nation
The Canadian Public Broadcaster on a Diet: Slimming down for a whole nation
 
The Canadian Public Broadcaster on a Diet: Slimming Down for a Whole Nation
The Canadian Public Broadcaster on a Diet: Slimming Down for a Whole NationThe Canadian Public Broadcaster on a Diet: Slimming Down for a Whole Nation
The Canadian Public Broadcaster on a Diet: Slimming Down for a Whole Nation
 
Overboard.js - where are we going with with jsconfasia / devfestasia
Overboard.js - where are we going with with jsconfasia / devfestasiaOverboard.js - where are we going with with jsconfasia / devfestasia
Overboard.js - where are we going with with jsconfasia / devfestasia
 
DevOps and All the Continuouses w/ Helen Beal
DevOps and All the Continuouses w/ Helen BealDevOps and All the Continuouses w/ Helen Beal
DevOps and All the Continuouses w/ Helen Beal
 
Pycon 2014 - Flask vs Django vs Web.py (PANEL)
Pycon 2014 - Flask vs Django vs Web.py (PANEL)Pycon 2014 - Flask vs Django vs Web.py (PANEL)
Pycon 2014 - Flask vs Django vs Web.py (PANEL)
 
DevOps Training - Ho Chi Minh City
DevOps Training - Ho Chi Minh CityDevOps Training - Ho Chi Minh City
DevOps Training - Ho Chi Minh City
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack Toronto
 
This is the web platform
This is the web platformThis is the web platform
This is the web platform
 
Jenkins User Conference 2014
Jenkins User Conference 2014Jenkins User Conference 2014
Jenkins User Conference 2014
 
Amped for AMP at Pubcon Las Vegas 2016
Amped for AMP at Pubcon Las Vegas 2016Amped for AMP at Pubcon Las Vegas 2016
Amped for AMP at Pubcon Las Vegas 2016
 
A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...A call to JS Developers - Let’s stop trying to impress each other and start b...
A call to JS Developers - Let’s stop trying to impress each other and start b...
 
Measuring web performance with user-centric metrics
Measuring web performance with user-centric metricsMeasuring web performance with user-centric metrics
Measuring web performance with user-centric metrics
 

More from Barbara Bermes

Developing for Mobile Web
Developing for Mobile WebDeveloping for Mobile Web
Developing for Mobile Web
Barbara Bermes
 
Business Analysis - Essentials
Business Analysis - EssentialsBusiness Analysis - Essentials
Business Analysis - Essentials
Barbara Bermes
 

More from Barbara Bermes (8)

Cheat Sheet to a Lean Website
Cheat Sheet to a Lean WebsiteCheat Sheet to a Lean Website
Cheat Sheet to a Lean Website
 
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSMWebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
WebExpo Talk: EMBRACING PERFORMANCE IN TODAY’S MULTI-PLATFORM MACROCOSM
 
The CBC on a diet - Slimming down for a whole nation
The CBC on a diet - Slimming down for a whole nationThe CBC on a diet - Slimming down for a whole nation
The CBC on a diet - Slimming down for a whole nation
 
Smartphones in Today's World
Smartphones in Today's WorldSmartphones in Today's World
Smartphones in Today's World
 
Building Energy-Efficient Websites
Building Energy-Efficient WebsitesBuilding Energy-Efficient Websites
Building Energy-Efficient Websites
 
Developing for Mobile Web
Developing for Mobile WebDeveloping for Mobile Web
Developing for Mobile Web
 
Business Analysis - Essentials
Business Analysis - EssentialsBusiness Analysis - Essentials
Business Analysis - Essentials
 
Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Third Party Footprint: Evaluating the Performance of External Scripts