SlideShare una empresa de Scribd logo
1 de 42
Descargar para leer sin conexión
The Render Chain And You
Joseph Morrissey – jmorriss@akamai.com
Matt Ringel – ringel@akamai.com
©2013 AKAMAI | FASTER FORWARDTM
Agenda
•  Browser Basics
•  Best Practices Review
•  Lessons Learned
•  Questions and Some Answers
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Browser’s Main Components
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Relevant Standards
•  HTML 4.01, XHTML 1.1, HTML 5
•  Cascading Style Sheets
•  CSS 2.1
•  Media Queries Level 3
•  Selectors Level 3
•  CSS Color Level 3
•  ECMAScript Ed 5
•  DOM Level 3
http://www.webdevout.net/browser-support
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Browser Modes
•  Standards Mode
•  Strict Adherence to CSS and HTML Specifications.
•  Quirk Mode
•  Less adherence to the specifications to maintain the correct display of older pages.
A common example is the way older versions of IE calculated an elements Height
and Width differently from the CSS specification. Therefore pages created for
correct display on that version of IE, displayed badly on newer versions that were
compliant with the CSS specification.
Switching Modes is controlled via the presence/correctness of the DOCTYPE
declaration. Or through Version Targeting Header X-UA-Compatible
Using Standards gives your pages the best chance of correctly displaying across
User Agents
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Main Flow
Rendering Engines
•  Gecko: Mozilla
•  WebKit: Safari, Chrome (KindOf)
•  Trident: IE
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Gecko, WebKit
Gecko
WebKit
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: HTML Parsing
package org.w3c.dom.html2;
public interface HTMLBodyElement extends HTMLElement {
public String getALink();
public void setALink(String aLink);
public String getBackground();
public void setBackground(String background);
public String getBgColor();
public void setBgColor(String bgColor);
public String getLink();
public void setLink(String link);
public String getText();
public void setText(String text);
public String getVLink();
public void setVLink(String vLink);
}
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: CSS Parser
CSS Rule
selector { style property : style ; }
Type Selector
h1, h2 {color: green }
Universal Selector
* { font-family : Verdana, Helvetica, sans-serif ; }
ID Selector
h1#chapter1 { text-align: center }
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Order of Parsing
•  CSS Files are retrieved in parallel
•  SCRIPT elements may block the HTML parser and delay the
completion of the DOM
•  Location of style sheet links and javascript can combine to
introduce even bigger delays
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Render and reflow/layout
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: Painting
©2013 AKAMAI | FASTER FORWARDTM
Browser Basics: OK So What?
To improve rendering:
•  Get the bits to the engine faster
•  Construct the HTML to minimize parsing effort and not block the
DOM build and subsequently the render tree
•  Construct the CSS to minimize the effort expended in selecting
the style for each CSS Box
•  Minimize reflow/layout or repainting
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review: General
You should consider:
•  Use a CDN
•  File Compression
•  Expires or Cache-Control Header
•  No Vary Header
•  Domain Sharding
•  Cookieless Domains
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review: Over Akamai
When working with our customers we have more options and we
often employ:
•  SR4P for non-cacheable HTML delivery
•  TCP/Opts
•  Last Mile Accelerator – gzip on Akamai
•  Embedded Object Prefetching – Edge Side prefetch
•  Akamai Instant – Edge Side Page prefetch
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review: HTML
You should consider:
•  Asynch Javascript or put it at the bottom of the <BODY>
•  CSS in <HEAD>, Link don’t import CSS files
•  Provide width and height values in <TABLE>, <TD> and <IMG>
•  Inline small images/javascript
•  Lazy Load Below the fold images
•  Progressive JPGs
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review: CSS
You should consider:
•  Minify
•  Consolidation – “Average Web Page has 100 objects per page“*
•  Specific selector
*http://www.websiteoptimization.com/speed/tweak/average-web-page/
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review: JavaScript
You should consider:
•  Minify – “In Ten Top US Websites minification achieved 21% size
reduction”*
•  Consolidation
•  Avoid coding that causes reflow/layout
•  If the Javascript must block is it efficiently coded?
* http://developer.yahoo.com/performance/rules.html#minify
©2013 AKAMAI | FASTER FORWARDTM
Best Practices Review: Akamai Front End Opt
Reduction in Round trips
•  HTML 5 Adaptive Cache
•  Just-In-Time Image Loading
•  Small Image Embedding
•  Small JavaScript File
Embedding
•  File Versioning
•  HTML 5 Persistent
Cache
Reduction in Object Size
•  Responsive Images:
•  Resizes Images to HTML
Dimensions
•  Lossless Image
Compression
•  Adaptive Image Sizing
•  Cookieless Static Assets
•  GZIP Compression
•  Minification
Accelerated Rendering
•  JavaScript Pre-Execution
•  Asynchronous JavaScript
Execution
•  Asynchronous CSS
•  Optimize JS and CSS Load
Order
•  Response Prediction
•  Page Prefetching
•  Domain Sharding
©2013 AKAMAI | FASTER FORWARDTM
Lessons Learned
©2013 AKAMAI | FASTER FORWARDTM
Recap: The Rules of Rendering
The One Rule:
Anything that introduces uncertainty into how the page should be
rendered will block rendering until it's resolved.
Javascript
CSS
Long load times
©2013 AKAMAI | FASTER FORWARDTM
Rule #1: Scripts Block Parsing
Posit: JavaScript is a single-threaded environment, and change the
DOM
Consequence: The render chain blocks.
Result: The browser will sit there parsing it all.
Conclusion: Don’t do that. Use async/defer where you can.
* HTML5 JavaScript Workers change this a bit
©2013 AKAMAI | FASTER FORWARDTM
Rule #2: Style Sheets Block Rendering
Posit: Anything that can force a re-flow will introduce uncertainty.
Consequence: CSS blocks rendering
Result: Inline or interspersed CSS will block rendering.
Conclusion: Pare it down, put it first.
* CSS “print” styles or non-matching media selectors will not block because they’re not immediately applicable.
©2013 AKAMAI | FASTER FORWARDTM
Rule #3: Less Caching, More Problems.
Posit: The fastest load time is when the browser already has the
data.
Consequence: Origin hits cost time and are distance-based.
Result: Non-cacheable content creates high variability in page load
time.
Conclusion: Cache browser-side if possible, consider using a CDN.
* Really, any CDN will be better than none, although the author might have certain biases.
©2013 AKAMAI | FASTER FORWARDTM
E-Commerce sites: The Top Five Rendering Issues
E-Commerce sites rest on two separate, but equally important
metrics:
Abandonment representing who leaves,
and Conversion representing who buys.
These are their stories.
©2013 AKAMAI | FASTER FORWARDTM
1. Front-Loading all of the JavaScript
Problem: Load too much synchronous JS up-front, and the browser
sits and spins, without painting a single pixel.
Result: A lot of “blank page” time.
Solution: Defer/async all of the JS you can. “CSS at top, JS at
bottom” is a very good metric for keeping the render chain happy.
©2013 AKAMAI | FASTER FORWARDTM
1. What does front-loading look like?
91 pre-render
requests
35 out of the first 91
calls are JS
First pixel is at 2.7
seconds.
©2013 AKAMAI | FASTER FORWARDTM
1. Front-Loading Network Effects
First image download: ~1.9
seconds.
Nearly all JS for first ~1.6 seconds
©2013 AKAMAI | FASTER FORWARDTM
1. Wicked fast
Utility sprite downloaded after first CSS
First pixel at 0.45 seconds
©2013 AKAMAI | FASTER FORWARDTM
1. Okay, maybe not that fast.
Most of the page is
brought in via AJAX
after initial load.
©2013 AKAMAI | FASTER FORWARDTM
2. Cargo-cult JS and CSS
Operationally, loading the same JS/CSS for every page makes
sense, but there’s a cost.
The vast majority of CSS rules may never get used, but the render
chain has to evaluate them just the same.*
Tools: YUICombine, YUICompress, using versioned files when
combining. Use CSS and JS coverage tools to figure out what you’re
not using.
*In that way, the render chain is much like a honey badger.
©2013 AKAMAI | FASTER FORWARDTM
2. Not so different, after all….
Home Page Product Description
Substantially the same
JS is being downloaded
for every page.
©2013 AKAMAI | FASTER FORWARDTM
2. The repeat view is better… kind of.
Load time is down 56%
Requests are down 89%
But start of render is only down 36%.
Cached JS is still parsed JS.
56% 36% ?? 89%
©2013 AKAMAI | FASTER FORWARDTM
3. Third-party tags and widgets
Beacons, Widgets, Tags,
CustomerMonetizationSynergisticThingies™, etc.
Page performance is now controlled by a third party, they block
everything below them on the page, and there’s a network penalty
for DNS resolution.
Harm reduction: Put them as low on the base page as possible.
Consider a tag aggregation service in order to reduce the amount of
requests.
©2013 AKAMAI | FASTER FORWARDTM
3. Aggregators are good, but….
….beware of adding tags, pre-paint. That’s still ~350ms of tags with a blank page.
©2013 AKAMAI | FASTER FORWARDTM
3. Later on, during the rest of the page load…..
Redirects are a tax on every
page.
Don’t neglect SSL negotiation
time.
Everything lower on the page
can’t be painted due to these
tags.
©2013 AKAMAI | FASTER FORWARDTM
4: Actively hindering cacheability: “Hello, Bob”
Many sites allow a user to log in.
Many sites then put the user’s name at the top of the page.
Many sites then bake the user’s name into the HTML sent from the
origin, rendering the page non-cacheable.
Don’t do that. Look at doing an asynchronous load.
©2013 AKAMAI | FASTER FORWARDTM
4. QED
xx_1.Page_Name = "";
xx_2.Login_Status = "Logged in";
xx_3.User_ID = "846000486";
(and later on that page…)
<script charset='utf-8' type='text/javascript'>
var userID ='';
userID ='akamai@example.com';
</script>
©2013 AKAMAI | FASTER FORWARDTM
5. The Cookie Tax
Cookies are a fact of life, but avoid sending them for static objects.
The browser could send hundreds of KB just to ask for the page.*
For small graphics, total load time (up + down) could double.
* I’ve seen one site require 12KB of cookies on each request. No, I’m not telling you who.
©2013 AKAMAI | FASTER FORWARDTM
5. This is for every embedded object
79 requests * 1,376 bytes / request = 108,704 bytes
Moreover, this will not fit into a single IP datagram on a desktop or laptop.
©2013 AKAMAI | FASTER FORWARDTM
5. Why this is important (an anecdote)
2 ½ hours after the 9/11 attacks,
CNN redid their website to fit inside
a single IP Datagram, in order to
stay online.
Fitting a request inside a datagram
is much easier.
Source: http://www.interactivepublishing.net/september/browse.php?co=CNN

Más contenido relacionado

La actualidad más candente

Happy Browser, Happy User! NY Web Performance Meetup 9/20/19
Happy Browser, Happy User! NY Web Performance Meetup 9/20/19Happy Browser, Happy User! NY Web Performance Meetup 9/20/19
Happy Browser, Happy User! NY Web Performance Meetup 9/20/19Katie Sylor-Miller
 
A little journey into website optimization
A little journey into website optimizationA little journey into website optimization
A little journey into website optimizationStelian Firez
 
High Performance Images in WordPress
High Performance Images in WordPressHigh Performance Images in WordPress
High Performance Images in WordPresskeithdevon
 
Architectures For Scaling Ajax
Architectures For Scaling AjaxArchitectures For Scaling Ajax
Architectures For Scaling Ajaxwolframkriesing
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoMaximiliano Firtman
 
MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...MeasureWorks
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Aaron Gustafson
 
Velocity 2012: The 90-Minute Mobile Optimization Life Cycle
Velocity 2012: The 90-Minute Mobile Optimization Life CycleVelocity 2012: The 90-Minute Mobile Optimization Life Cycle
Velocity 2012: The 90-Minute Mobile Optimization Life CycleStrangeloop
 
GTMetrix - LintasMe Performance Report - March, 20th 2014
GTMetrix - LintasMe Performance Report - March, 20th 2014GTMetrix - LintasMe Performance Report - March, 20th 2014
GTMetrix - LintasMe Performance Report - March, 20th 2014draskolnikova
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)dpc
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)jjhuff
 
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...panagenda
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1Robert Nyman
 
Responsive Images and Performance
Responsive Images and PerformanceResponsive Images and Performance
Responsive Images and PerformanceMaximiliano Firtman
 
Beyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance ChecklistBeyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance ChecklistCloudinary
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)SOASTA
 
Mot cph when its just too slow
Mot cph when its just too slowMot cph when its just too slow
Mot cph when its just too slowDoug Sillars
 
Web performance optimization for everyone
Web performance optimization for everyoneWeb performance optimization for everyone
Web performance optimization for everyoneitnig
 

La actualidad más candente (19)

Happy Browser, Happy User! NY Web Performance Meetup 9/20/19
Happy Browser, Happy User! NY Web Performance Meetup 9/20/19Happy Browser, Happy User! NY Web Performance Meetup 9/20/19
Happy Browser, Happy User! NY Web Performance Meetup 9/20/19
 
A little journey into website optimization
A little journey into website optimizationA little journey into website optimization
A little journey into website optimization
 
Why AMP for WordPress?
Why AMP for WordPress? Why AMP for WordPress?
Why AMP for WordPress?
 
High Performance Images in WordPress
High Performance Images in WordPressHigh Performance Images in WordPress
High Performance Images in WordPress
 
Architectures For Scaling Ajax
Architectures For Scaling AjaxArchitectures For Scaling Ajax
Architectures For Scaling Ajax
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack Toronto
 
MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...MeasureWorks - Why people hate to wait for your website to load (and how to f...
MeasureWorks - Why people hate to wait for your website to load (and how to f...
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]
 
Velocity 2012: The 90-Minute Mobile Optimization Life Cycle
Velocity 2012: The 90-Minute Mobile Optimization Life CycleVelocity 2012: The 90-Minute Mobile Optimization Life Cycle
Velocity 2012: The 90-Minute Mobile Optimization Life Cycle
 
GTMetrix - LintasMe Performance Report - March, 20th 2014
GTMetrix - LintasMe Performance Report - March, 20th 2014GTMetrix - LintasMe Performance Report - March, 20th 2014
GTMetrix - LintasMe Performance Report - March, 20th 2014
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
 
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
Inside Picnik: How We Built Picnik (and What We Learned Along the Way)
 
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
AD1387: Outside The Box: Integrating with Non-Domino Apps using XPages and Ja...
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
 
Responsive Images and Performance
Responsive Images and PerformanceResponsive Images and Performance
Responsive Images and Performance
 
Beyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance ChecklistBeyond Resizing: The Image Performance Checklist
Beyond Resizing: The Image Performance Checklist
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)
 
Mot cph when its just too slow
Mot cph when its just too slowMot cph when its just too slow
Mot cph when its just too slow
 
Web performance optimization for everyone
Web performance optimization for everyoneWeb performance optimization for everyone
Web performance optimization for everyone
 

Destacado

Toms radio advert evaluation
Toms radio advert evaluation Toms radio advert evaluation
Toms radio advert evaluation 08cornicktho
 
Petição do MPF à Justiça federal sobre Lagoa da Conceição
Petição do MPF à Justiça federal sobre Lagoa da ConceiçãoPetição do MPF à Justiça federal sobre Lagoa da Conceição
Petição do MPF à Justiça federal sobre Lagoa da ConceiçãoLuis Antonio Hangai
 
SCG Salesforce training: opportunities
SCG Salesforce training: opportunitiesSCG Salesforce training: opportunities
SCG Salesforce training: opportunitiescanheier
 
Managing data for marine sciences
Managing data for marine sciencesManaging data for marine sciences
Managing data for marine sciencesAdam Leadbetter
 
SCG Salesforce training: campaigns
SCG Salesforce training: campaigns SCG Salesforce training: campaigns
SCG Salesforce training: campaigns canheier
 
Using Erddap as a building block in Ireland's Integrated Digital Ocean
Using Erddap as a building block in Ireland's Integrated Digital OceanUsing Erddap as a building block in Ireland's Integrated Digital Ocean
Using Erddap as a building block in Ireland's Integrated Digital OceanAdam Leadbetter
 
How to Stay Healthy at the Office
How to Stay Healthy at the OfficeHow to Stay Healthy at the Office
How to Stay Healthy at the OfficeAshley Davidson
 
Where Linked Data meets Big Data: Applying standard data models to environmen...
Where Linked Data meets Big Data: Applying standard data models to environmen...Where Linked Data meets Big Data: Applying standard data models to environmen...
Where Linked Data meets Big Data: Applying standard data models to environmen...Adam Leadbetter
 
Salesforce training: Accounts & Contacts
Salesforce training: Accounts & ContactsSalesforce training: Accounts & Contacts
Salesforce training: Accounts & Contactscanheier
 
Linked Ocean Data - Exploring connections between marine datasets in a Big Da...
Linked Ocean Data - Exploring connections between marine datasets in a Big Da...Linked Ocean Data - Exploring connections between marine datasets in a Big Da...
Linked Ocean Data - Exploring connections between marine datasets in a Big Da...Adam Leadbetter
 
Taller 3 powert point sebastian david lópez gonzalez
Taller 3 powert point sebastian david lópez gonzalezTaller 3 powert point sebastian david lópez gonzalez
Taller 3 powert point sebastian david lópez gonzalezSebastian Lopez
 
Ireland presentation aoife v5
Ireland presentation aoife  v5Ireland presentation aoife  v5
Ireland presentation aoife v5bestpersonnel
 

Destacado (14)

Toms radio advert evaluation
Toms radio advert evaluation Toms radio advert evaluation
Toms radio advert evaluation
 
Petição do MPF à Justiça federal sobre Lagoa da Conceição
Petição do MPF à Justiça federal sobre Lagoa da ConceiçãoPetição do MPF à Justiça federal sobre Lagoa da Conceição
Petição do MPF à Justiça federal sobre Lagoa da Conceição
 
Connected Ocean Data
Connected Ocean DataConnected Ocean Data
Connected Ocean Data
 
SCG Salesforce training: opportunities
SCG Salesforce training: opportunitiesSCG Salesforce training: opportunities
SCG Salesforce training: opportunities
 
Escriptura de 5 a 6 anys
Escriptura de  5 a  6 anysEscriptura de  5 a  6 anys
Escriptura de 5 a 6 anys
 
Managing data for marine sciences
Managing data for marine sciencesManaging data for marine sciences
Managing data for marine sciences
 
SCG Salesforce training: campaigns
SCG Salesforce training: campaigns SCG Salesforce training: campaigns
SCG Salesforce training: campaigns
 
Using Erddap as a building block in Ireland's Integrated Digital Ocean
Using Erddap as a building block in Ireland's Integrated Digital OceanUsing Erddap as a building block in Ireland's Integrated Digital Ocean
Using Erddap as a building block in Ireland's Integrated Digital Ocean
 
How to Stay Healthy at the Office
How to Stay Healthy at the OfficeHow to Stay Healthy at the Office
How to Stay Healthy at the Office
 
Where Linked Data meets Big Data: Applying standard data models to environmen...
Where Linked Data meets Big Data: Applying standard data models to environmen...Where Linked Data meets Big Data: Applying standard data models to environmen...
Where Linked Data meets Big Data: Applying standard data models to environmen...
 
Salesforce training: Accounts & Contacts
Salesforce training: Accounts & ContactsSalesforce training: Accounts & Contacts
Salesforce training: Accounts & Contacts
 
Linked Ocean Data - Exploring connections between marine datasets in a Big Da...
Linked Ocean Data - Exploring connections between marine datasets in a Big Da...Linked Ocean Data - Exploring connections between marine datasets in a Big Da...
Linked Ocean Data - Exploring connections between marine datasets in a Big Da...
 
Taller 3 powert point sebastian david lópez gonzalez
Taller 3 powert point sebastian david lópez gonzalezTaller 3 powert point sebastian david lópez gonzalez
Taller 3 powert point sebastian david lópez gonzalez
 
Ireland presentation aoife v5
Ireland presentation aoife  v5Ireland presentation aoife  v5
Ireland presentation aoife v5
 

Similar a Boston Web Performance Meetup: The Render Chain and You

Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
Velocity spa faster_092116
Velocity spa faster_092116Velocity spa faster_092116
Velocity spa faster_092116Manuel Alvarez
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Boris Livshutz
 
Optimization 2020 | Using Edge SEO For Technical Issues ft. Dan Taylor
Optimization 2020 | Using Edge SEO For Technical Issues ft. Dan TaylorOptimization 2020 | Using Edge SEO For Technical Issues ft. Dan Taylor
Optimization 2020 | Using Edge SEO For Technical Issues ft. Dan TaylorDan Taylor
 
Boosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsBoosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsAlyss Noland
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)clickramanm
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client PerformanceHerea Adrian
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek editionChris Love
 
2009_09_11_Grid960
2009_09_11_Grid9602009_09_11_Grid960
2009_09_11_Grid960LightSpeed
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations Shawn DeWolfe
 
Optimizing web performance (Fronteers edition)
Optimizing web performance (Fronteers edition)Optimizing web performance (Fronteers edition)
Optimizing web performance (Fronteers edition)Dave Olsen
 
Magento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side OptimizationsMagento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side OptimizationsPINT Inc
 
SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained Steve Weber
 
High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 

Similar a Boston Web Performance Meetup: The Render Chain and You (20)

Website Performance
Website PerformanceWebsite Performance
Website Performance
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Velocity spa faster_092116
Velocity spa faster_092116Velocity spa faster_092116
Velocity spa faster_092116
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
 
Optimization 2020 | Using Edge SEO For Technical Issues ft. Dan Taylor
Optimization 2020 | Using Edge SEO For Technical Issues ft. Dan TaylorOptimization 2020 | Using Edge SEO For Technical Issues ft. Dan Taylor
Optimization 2020 | Using Edge SEO For Technical Issues ft. Dan Taylor
 
Boosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsBoosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvements
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
 
Performance tuning of Websites
Performance tuning of WebsitesPerformance tuning of Websites
Performance tuning of Websites
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek edition
 
2009_09_11_Grid960
2009_09_11_Grid9602009_09_11_Grid960
2009_09_11_Grid960
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Assessing Your Own Site Configuration
Assessing Your Own Site ConfigurationAssessing Your Own Site Configuration
Assessing Your Own Site Configuration
 
Word press optimizations
Word press optimizations Word press optimizations
Word press optimizations
 
Optimizing web performance (Fronteers edition)
Optimizing web performance (Fronteers edition)Optimizing web performance (Fronteers edition)
Optimizing web performance (Fronteers edition)
 
Magento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side OptimizationsMagento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side Optimizations
 
SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained
 
High performance website
High performance websiteHigh performance website
High performance website
 
Speed!
Speed!Speed!
Speed!
 

Último

Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Último (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Boston Web Performance Meetup: The Render Chain and You

  • 1. The Render Chain And You Joseph Morrissey – jmorriss@akamai.com Matt Ringel – ringel@akamai.com
  • 2. ©2013 AKAMAI | FASTER FORWARDTM Agenda •  Browser Basics •  Best Practices Review •  Lessons Learned •  Questions and Some Answers
  • 3. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Browser’s Main Components
  • 4. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Relevant Standards •  HTML 4.01, XHTML 1.1, HTML 5 •  Cascading Style Sheets •  CSS 2.1 •  Media Queries Level 3 •  Selectors Level 3 •  CSS Color Level 3 •  ECMAScript Ed 5 •  DOM Level 3 http://www.webdevout.net/browser-support
  • 5. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Browser Modes •  Standards Mode •  Strict Adherence to CSS and HTML Specifications. •  Quirk Mode •  Less adherence to the specifications to maintain the correct display of older pages. A common example is the way older versions of IE calculated an elements Height and Width differently from the CSS specification. Therefore pages created for correct display on that version of IE, displayed badly on newer versions that were compliant with the CSS specification. Switching Modes is controlled via the presence/correctness of the DOCTYPE declaration. Or through Version Targeting Header X-UA-Compatible Using Standards gives your pages the best chance of correctly displaying across User Agents
  • 6. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Main Flow Rendering Engines •  Gecko: Mozilla •  WebKit: Safari, Chrome (KindOf) •  Trident: IE
  • 7. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Gecko, WebKit Gecko WebKit
  • 8. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: HTML Parsing package org.w3c.dom.html2; public interface HTMLBodyElement extends HTMLElement { public String getALink(); public void setALink(String aLink); public String getBackground(); public void setBackground(String background); public String getBgColor(); public void setBgColor(String bgColor); public String getLink(); public void setLink(String link); public String getText(); public void setText(String text); public String getVLink(); public void setVLink(String vLink); }
  • 9. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: CSS Parser CSS Rule selector { style property : style ; } Type Selector h1, h2 {color: green } Universal Selector * { font-family : Verdana, Helvetica, sans-serif ; } ID Selector h1#chapter1 { text-align: center }
  • 10. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Order of Parsing •  CSS Files are retrieved in parallel •  SCRIPT elements may block the HTML parser and delay the completion of the DOM •  Location of style sheet links and javascript can combine to introduce even bigger delays
  • 11. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Render and reflow/layout
  • 12. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: Painting
  • 13. ©2013 AKAMAI | FASTER FORWARDTM Browser Basics: OK So What? To improve rendering: •  Get the bits to the engine faster •  Construct the HTML to minimize parsing effort and not block the DOM build and subsequently the render tree •  Construct the CSS to minimize the effort expended in selecting the style for each CSS Box •  Minimize reflow/layout or repainting
  • 14. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review
  • 15. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review: General You should consider: •  Use a CDN •  File Compression •  Expires or Cache-Control Header •  No Vary Header •  Domain Sharding •  Cookieless Domains
  • 16. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review: Over Akamai When working with our customers we have more options and we often employ: •  SR4P for non-cacheable HTML delivery •  TCP/Opts •  Last Mile Accelerator – gzip on Akamai •  Embedded Object Prefetching – Edge Side prefetch •  Akamai Instant – Edge Side Page prefetch
  • 17. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review: HTML You should consider: •  Asynch Javascript or put it at the bottom of the <BODY> •  CSS in <HEAD>, Link don’t import CSS files •  Provide width and height values in <TABLE>, <TD> and <IMG> •  Inline small images/javascript •  Lazy Load Below the fold images •  Progressive JPGs
  • 18. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review: CSS You should consider: •  Minify •  Consolidation – “Average Web Page has 100 objects per page“* •  Specific selector *http://www.websiteoptimization.com/speed/tweak/average-web-page/
  • 19. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review: JavaScript You should consider: •  Minify – “In Ten Top US Websites minification achieved 21% size reduction”* •  Consolidation •  Avoid coding that causes reflow/layout •  If the Javascript must block is it efficiently coded? * http://developer.yahoo.com/performance/rules.html#minify
  • 20. ©2013 AKAMAI | FASTER FORWARDTM Best Practices Review: Akamai Front End Opt Reduction in Round trips •  HTML 5 Adaptive Cache •  Just-In-Time Image Loading •  Small Image Embedding •  Small JavaScript File Embedding •  File Versioning •  HTML 5 Persistent Cache Reduction in Object Size •  Responsive Images: •  Resizes Images to HTML Dimensions •  Lossless Image Compression •  Adaptive Image Sizing •  Cookieless Static Assets •  GZIP Compression •  Minification Accelerated Rendering •  JavaScript Pre-Execution •  Asynchronous JavaScript Execution •  Asynchronous CSS •  Optimize JS and CSS Load Order •  Response Prediction •  Page Prefetching •  Domain Sharding
  • 21. ©2013 AKAMAI | FASTER FORWARDTM Lessons Learned
  • 22. ©2013 AKAMAI | FASTER FORWARDTM Recap: The Rules of Rendering The One Rule: Anything that introduces uncertainty into how the page should be rendered will block rendering until it's resolved. Javascript CSS Long load times
  • 23. ©2013 AKAMAI | FASTER FORWARDTM Rule #1: Scripts Block Parsing Posit: JavaScript is a single-threaded environment, and change the DOM Consequence: The render chain blocks. Result: The browser will sit there parsing it all. Conclusion: Don’t do that. Use async/defer where you can. * HTML5 JavaScript Workers change this a bit
  • 24. ©2013 AKAMAI | FASTER FORWARDTM Rule #2: Style Sheets Block Rendering Posit: Anything that can force a re-flow will introduce uncertainty. Consequence: CSS blocks rendering Result: Inline or interspersed CSS will block rendering. Conclusion: Pare it down, put it first. * CSS “print” styles or non-matching media selectors will not block because they’re not immediately applicable.
  • 25. ©2013 AKAMAI | FASTER FORWARDTM Rule #3: Less Caching, More Problems. Posit: The fastest load time is when the browser already has the data. Consequence: Origin hits cost time and are distance-based. Result: Non-cacheable content creates high variability in page load time. Conclusion: Cache browser-side if possible, consider using a CDN. * Really, any CDN will be better than none, although the author might have certain biases.
  • 26. ©2013 AKAMAI | FASTER FORWARDTM E-Commerce sites: The Top Five Rendering Issues E-Commerce sites rest on two separate, but equally important metrics: Abandonment representing who leaves, and Conversion representing who buys. These are their stories.
  • 27. ©2013 AKAMAI | FASTER FORWARDTM 1. Front-Loading all of the JavaScript Problem: Load too much synchronous JS up-front, and the browser sits and spins, without painting a single pixel. Result: A lot of “blank page” time. Solution: Defer/async all of the JS you can. “CSS at top, JS at bottom” is a very good metric for keeping the render chain happy.
  • 28. ©2013 AKAMAI | FASTER FORWARDTM 1. What does front-loading look like? 91 pre-render requests 35 out of the first 91 calls are JS First pixel is at 2.7 seconds.
  • 29. ©2013 AKAMAI | FASTER FORWARDTM 1. Front-Loading Network Effects First image download: ~1.9 seconds. Nearly all JS for first ~1.6 seconds
  • 30. ©2013 AKAMAI | FASTER FORWARDTM 1. Wicked fast Utility sprite downloaded after first CSS First pixel at 0.45 seconds
  • 31. ©2013 AKAMAI | FASTER FORWARDTM 1. Okay, maybe not that fast. Most of the page is brought in via AJAX after initial load.
  • 32. ©2013 AKAMAI | FASTER FORWARDTM 2. Cargo-cult JS and CSS Operationally, loading the same JS/CSS for every page makes sense, but there’s a cost. The vast majority of CSS rules may never get used, but the render chain has to evaluate them just the same.* Tools: YUICombine, YUICompress, using versioned files when combining. Use CSS and JS coverage tools to figure out what you’re not using. *In that way, the render chain is much like a honey badger.
  • 33. ©2013 AKAMAI | FASTER FORWARDTM 2. Not so different, after all…. Home Page Product Description Substantially the same JS is being downloaded for every page.
  • 34. ©2013 AKAMAI | FASTER FORWARDTM 2. The repeat view is better… kind of. Load time is down 56% Requests are down 89% But start of render is only down 36%. Cached JS is still parsed JS. 56% 36% ?? 89%
  • 35. ©2013 AKAMAI | FASTER FORWARDTM 3. Third-party tags and widgets Beacons, Widgets, Tags, CustomerMonetizationSynergisticThingies™, etc. Page performance is now controlled by a third party, they block everything below them on the page, and there’s a network penalty for DNS resolution. Harm reduction: Put them as low on the base page as possible. Consider a tag aggregation service in order to reduce the amount of requests.
  • 36. ©2013 AKAMAI | FASTER FORWARDTM 3. Aggregators are good, but…. ….beware of adding tags, pre-paint. That’s still ~350ms of tags with a blank page.
  • 37. ©2013 AKAMAI | FASTER FORWARDTM 3. Later on, during the rest of the page load….. Redirects are a tax on every page. Don’t neglect SSL negotiation time. Everything lower on the page can’t be painted due to these tags.
  • 38. ©2013 AKAMAI | FASTER FORWARDTM 4: Actively hindering cacheability: “Hello, Bob” Many sites allow a user to log in. Many sites then put the user’s name at the top of the page. Many sites then bake the user’s name into the HTML sent from the origin, rendering the page non-cacheable. Don’t do that. Look at doing an asynchronous load.
  • 39. ©2013 AKAMAI | FASTER FORWARDTM 4. QED xx_1.Page_Name = ""; xx_2.Login_Status = "Logged in"; xx_3.User_ID = "846000486"; (and later on that page…) <script charset='utf-8' type='text/javascript'> var userID =''; userID ='akamai@example.com'; </script>
  • 40. ©2013 AKAMAI | FASTER FORWARDTM 5. The Cookie Tax Cookies are a fact of life, but avoid sending them for static objects. The browser could send hundreds of KB just to ask for the page.* For small graphics, total load time (up + down) could double. * I’ve seen one site require 12KB of cookies on each request. No, I’m not telling you who.
  • 41. ©2013 AKAMAI | FASTER FORWARDTM 5. This is for every embedded object 79 requests * 1,376 bytes / request = 108,704 bytes Moreover, this will not fit into a single IP datagram on a desktop or laptop.
  • 42. ©2013 AKAMAI | FASTER FORWARDTM 5. Why this is important (an anecdote) 2 ½ hours after the 9/11 attacks, CNN redid their website to fit inside a single IP Datagram, in order to stay online. Fitting a request inside a datagram is much easier. Source: http://www.interactivepublishing.net/september/browse.php?co=CNN