SlideShare a Scribd company logo
Even Faster Web Sitesstevesouders.com/docs/wdx-20101014.pptxDisclaimer: This content does not necessarily reflect the                   opinions of my employer.flickr.com/photos/ddfic/722634166/
how exciting is web dev?flickr.com/photos/joshme17/1557627176/
darn exciting!flickr.com/photos/dougbrown47/4468708942//
flickr.com/photos/halans/5079721630/
darn exciting!flickr.com/photos/dougbrown47/4468708942//
flickr.com/photos/bekahstargazing/318930460/
 carsonified.com/blog/business/fred-wilsons-10-golden-principles-of-successful-web-apps/#1. Speed:        “First and foremost, we believe that speed is more than a feature. Speed is the most important feature.”
en.oreilly.com/velocity2009/public/schedule/detail/8523
en.oreilly.com/velocity2009/public/schedule/detail/8523
Yahoo!	0.4 sec slower	traffic  5-9%slideshare.net/stoyan/dont-make-me-wait-or-building-highperformance-web-applicationsslideshare.net/stoyan/yslow-20-presentation
blog.mozilla.com/metrics/category/website-optimization/…shaved 2.2 seconds off the average page load time and increased download conversions by 15.4%!
en.oreilly.com/velocity2009/public/schedule/detail/7709blog.mozilla.com/metrics/category/website-optimization/…shaved 2.2 seconds off the average page load time and increased download conversions by 15.4%!
en.oreilly.com/velocity2008/public/schedule/detail/3632
Site speed in search rankScreen shot of blog post…we've decided to take site speed into account in our search rankings.googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html
Web Directions South - Even Faster Web Sites
Bothcombine scriptscombine stylesheetsadd an Expires headergzip responsesput stylesheets at the topput scripts at the bottomavoid CSS expressionsmake JS and CSS externalreduce DNS lookupsminify JS and CSSavoid redirectsremove duplicate scriptsmake Ajax cacheablereduce cookie sizeuse cookie-free domainsdon't scale imagesYSlowuse CSS spritesuse a CDNconfigure ETagsuse GET for Ajax requestsreduce # of DOM elementsno 404savoid image filtersoptimize faviconPage Speeddefer loading JSremove unused CSSuse efficient CSS selectorsoptimize imagesoptimize order of CSS & JSshard domainsleverage proxy caching
Web Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web Sites
WebPerformanceOptimizationWPOdrives trafficimproves UXincreases revenuereduces costsflickr.com/photos/pedromourapinheiro/3123885534/
What makes sites feel slow?flickr.com/photos/kevincollins/234678305/
(lack of)Progressive Rendering[next page being loaded]flickr.com/photos/kevincollins/234678305/
Web Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web Sites
Web Directions South - Even Faster Web Sites
Search
Sports
News
Shopping
Progressive Enhancementdeliver HTMLdefer JSavoid DOMdecorate later
Progressive EnhancementProgressive Rendering
<script src="A.js"> blocks parallel downloads and rendering9 secs: IE 6-7, FF 3.0, Chr 1, Op 9-10, Saf 37 secs: IE 8-9, FF 3.6, Chr6, Saf 4Why focus on JavaScript?
29% avg229 K avginitial payload and execution
split the initial payloadsplit your JavaScript between what's needed to render the page and everything elsedefer "everything else"split manually (Page Speed), automatically (Microsoft Doloto)load scripts without blockinghttp://www.flickr.com/photos/devcentre/108032900/
Loading Scripts Without BlockingXHR EvalXHR InjectionScript in IframeScript DOM ElementScript Deferdocument.write Script Tag
XHR EvalvarxhrObj = getXHRObject();xhrObj.onreadystatechange =   function() {     if ( xhrObj.readyState != 4 ) return;eval(xhrObj.responseText);  };xhrObj.open('GET', 'A.js', true);xhrObj.send('');script & page must be same domain
Script DOM Elementvar se = document.createElement('script');se.src = 'http://anydomain.com/A.js';document.getElementsByTagName('head')[0].appendChild(se); script & page domains can differmay not preserve execution order
MeeboIframed JSvar iframe = document.createElement('iframe');document.body.appendChild(iframe);var doc = iframe.contentWindow.document;doc.open().write('<body onload="insertJS()">');doc.close();loads asynchronouslydelays parent’s load event: FF, Chr, Safgreat for 3rd party scriptsbetter for sandboxing & securityavoids iframe src roundtrip
GMail Mobile<script type="text/javascript">/*var ... */</script>get script DOM element's textremove commentseval() when invokedinline or iframeawesome for prefetching JS that might (not) be needed
Web Directions South - Even Faster Web Sites
window.setTimeout(function(){vara=document.createElement("script"); a.src="/extern_js/f/CgJlbhz8US8_w.js"; (document.getElementById("xjsd")||document.body).appendChild(a);},0);Google Search
Bootloader.setResourceMap({"CDYbm": {"name":"js\/32kskxvl4c8w0848.pkg.js",  "type":"js",  "src":"http:\/\/...\/1fakc64i.js"},...});var c=a ? document.body : document.getElementsByTagName('head')[0];vard=document.createElement('script');d.type='text/javascript';d.src=f;c.appendChild(d);Facebook
YUI.presentation.lazyScriptList = 	["http://l.yimg.com/a/combo?arc/yui/substitute_0.1.9.js&arc/yui/oop_0.1.10.js&[...58 more!...]"];d = w.document; h = d.getElementsByTagName("head")[0];n = d.createElement("script"),n.src = url;h.appendChild(n);Yahoo! FP
<head>...<script src="http://s.ytimg.com/yt/jsbin/www-core-vfl1I8mph.jsA"></script>...</head>YouTube
<body><div><table>[~40%]<script src="http://z-ecx.images-amazon.com/images/G/01/browser-scripts/us-site-wide-1.2.6/site-wide-4183309070.js._V198471533_.js"></script> Amazon
<script src="/js/jquery-1.4.2.js"></script></body></html>subsequent page:<script src="/js/jquery-1.4.2.js"></script><script src="/js/toChecklist.js"></script><script src="/js/tocs.js"></script></body></html>Craigslistprefetching?
<body><script src="http://include.ebaystatic.com/v4js/en_US/e673/SYS-RA_vjo_e67311309442_1_en_US.js"></script><script src="http://include.ebaystatic.com/v4js/en_US/e673/GH-RA_ReskinEbay_e67311309442_1_en_US.js"></script>...<script src="http://include.ebaystatic.com/v4js/en_US/e673/SYS-RA_vjo_e67311252543_opta_en_US.js"><script src="http://include.ebaystatic.com/v4js/en_US/e673/CCHP_HomepageV4_SLDR_e67311252543_6_en_US.js"></script></body>eBay
$LAB   .wait(function() {    $LAB      .script("http://a1.twimg.com/a/1286563368/javascripts/phoenix.bundle.js")      .wait(function() {        ...      });    $LAB      .script("http://a1.twimg.com/a/1286563368/javascripts/api.bundle.js")      .wait(function() {        ...      });  });(new)Twitterhttp://labjs.com/
vara=_d.createElement("script");a.type="text/javascript";a.src=b;_d.getElementsByTagName("head")[0].appendChild(a);Bingonload
<script src="http://bits.wikimedia.org/skins-1.5/common/wikibits.js?281c" type="text/javascript"></script><script src="http://bits.wikimedia.org/skins-1.5/common/jquery.min.js?281c" type="text/javascript"></script><script src="http://bits.wikimedia.org/skins-1.5/common/ajax.js?281c" type="text/javascript"></script><script src="http://bits.wikimedia.org/skins-1.5/common/mwsuggest.js?281c" type="text/javascript"></script><script src="http://bits.wikimedia.org/w/extensions/UsabilityInitiative/js/plugins.combined.min.js?281c" type="text/javascript"></script><script src="http://bits.wikimedia.org/w/extensions/UsabilityInitiative/Vector/Vector.combined.min.js?281c" type="text/javascript"></script><script src="http://upload.wikimedia.org/centralnotice/wikipedia/en/centralnotice.js?281c" type="text/javascript"></script><script src="/w/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=vector&amp;281c" type="text/javascript"></script></head>Wikipedia
frontend SPOF8.2secshttp://en.wikipedia.org/wiki/Flowers (from NZ)
Web Directions South - Even Faster Web Sites
Ray MorganZappos.comMakindeAdeagboFacebookJenn LukasHappy Cogflickr.com/photos/waltzaround/4041024134/
new stuff
mobile waterfalls (!)
Web Directions South - Even Faster Web Sites
mobile waterfalls (!)

More Related Content

PPTX
Design+Performance
PPTX
High Performance Web Components
PPTX
@media - Even Faster Web Sites
PPT
Web 2.0 Expo: Even Faster Web Sites
PDF
Metrics of Joy
PPTX
High Performance HTML5 (SF HTML5 UG)
PPTX
High Performance Mobile (SF/SV Web Perf)
PPTX
Design+Performance Velocity 2015
Design+Performance
High Performance Web Components
@media - Even Faster Web Sites
Web 2.0 Expo: Even Faster Web Sites
Metrics of Joy
High Performance HTML5 (SF HTML5 UG)
High Performance Mobile (SF/SV Web Perf)
Design+Performance Velocity 2015

What's hot (19)

PPTX
JavaScript Performance (at SFJS)
PPTX
do u webview?
PDF
State of the resource timing api
PPTX
How fast are we going now?
PPTX
Souders WPO Web2.0Expo
PPTX
Website performance optimisation
PPTX
High Performance Snippets
PPTX
Your Script Just Killed My Site
PDF
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
PDF
Java REST API Framework Comparison - PWX 2021
PDF
The Multipack Presents: "Wrestling With Asp.Net And Web Standards" by Anthony...
PDF
The Case for HTTP/2 - GreeceJS - June 2016
PDF
Building an Appier Web - May 2016
PDF
Dreamweaver CS6, jQuery, PhoneGap, mobile design
KEY
Taking your Web App for a walk
PDF
Building an Appier Web - Velocity Amsterdam 2016
PDF
High Performance JavaScript (YUIConf 2010)
PPTX
High Performance JavaScript (CapitolJS 2011)
PDF
10 Web Performance Lessons For the 21st Century
JavaScript Performance (at SFJS)
do u webview?
State of the resource timing api
How fast are we going now?
Souders WPO Web2.0Expo
Website performance optimisation
High Performance Snippets
Your Script Just Killed My Site
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
Java REST API Framework Comparison - PWX 2021
The Multipack Presents: "Wrestling With Asp.Net And Web Standards" by Anthony...
The Case for HTTP/2 - GreeceJS - June 2016
Building an Appier Web - May 2016
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Taking your Web App for a walk
Building an Appier Web - Velocity Amsterdam 2016
High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (CapitolJS 2011)
10 Web Performance Lessons For the 21st Century
Ad

Similar to Web Directions South - Even Faster Web Sites (20)

PPTX
Fronteers 20091105 (1)
PDF
Shifting Gears
PPT
Widget Summit 2008
PPT
Oscon 20080724
PPT
Web20expo 20080425
PPTX
Performance Tuning Web Apps - The Need For Speed
PPTX
High-Speed HTML5
PPT
Csdn Drdobbs Tenni Theurer Yahoo
PPTX
HTML5.pptx
PPTX
Fast by Default
KEY
Faster Frontends
PDF
Building performance into the new yahoo homepage presentation
PDF
Performance on the Yahoo! Homepage
PPTX
How to make your website blazing fast
PPT
High Performance Web Pages - 20 new best practices
KEY
A rough guide to JavaScript Performance
PPT
High Performance Ajax Applications 1197671494632682 2
PPT
High Performance Ajax Applications
PDF
Front-end optimisation & jQuery Internals
PPT
Building fast webapps, fast - Velocity 2010
Fronteers 20091105 (1)
Shifting Gears
Widget Summit 2008
Oscon 20080724
Web20expo 20080425
Performance Tuning Web Apps - The Need For Speed
High-Speed HTML5
Csdn Drdobbs Tenni Theurer Yahoo
HTML5.pptx
Fast by Default
Faster Frontends
Building performance into the new yahoo homepage presentation
Performance on the Yahoo! Homepage
How to make your website blazing fast
High Performance Web Pages - 20 new best practices
A rough guide to JavaScript Performance
High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications
Front-end optimisation & jQuery Internals
Building fast webapps, fast - Velocity 2010
Ad

More from Steve Souders (12)

PPTX
Make JavaScript Faster
PPTX
The Perception of Speed
PPTX
High Performance Web Components
PDF
Prebrowsing - Velocity NY 2013
PPTX
Cache is King
PPTX
Souders WPO Web 2.0 Expo
PPTX
JSConf US 2010
PDF
CouchDB Google
PPT
Even Faster Web Sites at jQuery Conference '09
PPTX
Browserscope Launch at TAE
PPT
Even Faster Web Sites at The Ajax Experience
PPT
SXSW: Even Faster Web Sites
Make JavaScript Faster
The Perception of Speed
High Performance Web Components
Prebrowsing - Velocity NY 2013
Cache is King
Souders WPO Web 2.0 Expo
JSConf US 2010
CouchDB Google
Even Faster Web Sites at jQuery Conference '09
Browserscope Launch at TAE
Even Faster Web Sites at The Ajax Experience
SXSW: Even Faster Web Sites

Web Directions South - Even Faster Web Sites

Editor's Notes

  • #8: Fred Wilson is Managing Partner of two venture capital firms, Flatiron Partners (Yoyodyne, Geocities) and Union Square Ventures (Twitter, delicious,Etsy, Feedburner).SpeedInstant utilitySoftware is mediaLess is moreMake it programmableMake it personalRESTfulDiscoverabilityCleanPlayful
  • #12: “if we’re able to achieve a similar performance boost across ourothertoplanding pages, we’ll drive in excess of 60 million yearly Firefox downloads.”
  • #13: This was a ~5 second speed up.
  • #15: Time measurements from real users.
  • #23: http://www.webpagetest.org/video/view.php?id=100630_734a5096ca2b97a217b756b277520c0a68e911d5.slow
  • #24: http://www.webpagetest.org/video/view.php?id=100608_ecbc76305fba361cafb31c0abd27d46617e65c24
  • #25: http://www.webpagetest.org/video/view.php?id=100608_ab0ebdaa528ad2c480ff16fb4e59e50a52bdd71f
  • #26: http://www.webpagetest.org/video/compare.php?tests=100607_SN,100607_SM,100607_SK,100607_SJ,100607_S6http://www.google.com/search?q=flowershttp://search.yahoo.com/search?p=flowershttp://www.bing.com/search?q=flowershttp://www.ask.com/web?q=flowershttp://search.aol.com/aol/search?q=flowersIE7, Dulles VA, DSL
  • #27: http://www.webpagetest.org/video/compare.php?tests=100608_e6e0257fd833ca1eb5669cd42e49570c%2C100608_7b873ad39b553f0dec08b2ec9fb14db0%2C100608_be6ad18d17fdcbd0ad4d5e5430db4815%2C100608_b8b544a8cf71bf02171a2bf473b56a03&amp;thumbSize=150&amp;ival=1000
  • #28: http://www.webpagetest.org/video/compare.php?tests=100608_1F9%2C100608_1FA%2C100608_1FB%2C100608_1FC%2C100608_1FD&amp;thumbSize=150&amp;ival=1000
  • #29: http://www.webpagetest.org/video/compare.php?tests=100608_1GG%2C100608_1GF%2C100608_1GD%2C100608_1GC%2C100608_1GB&amp;thumbSize=150&amp;ival=2000
  • #33: Data source: Steve Souders, updated April 2010
  • #35: All of these allow for parallel downloads, but none of them allow for parallel JS execution – that&apos;s not possible (currently, WebKit is doing some stuff on that).
  • #38: GMail Mobile: http://googlecode.blogspot.com/2009/09/gmail-for-mobile-html5-series-reducing.htmlSproutCore: http://blog.sproutcore.com/post/225219087/faster-loading-through-eval
  • #39: GMail Mobile: http://googlecode.blogspot.com/2009/09/gmail-for-mobile-html5-series-reducing.htmlSproutCore: http://blog.sproutcore.com/post/225219087/faster-loading-through-eval
  • #51: http://www.webpagetest.org/result/100708_13X0/1/details/
  • #56: http://www.browserscope.org/?category=network&amp;v=1&amp;ua=Android%202,Blackberry%206,Blackberry%208330,Blackberry%209700,Chrome%206,Firefox%203,IE%208,IE%20Mobile%208,iPad%204,iPhone%204,Nokia%2097,Opera%20Mini%204,Opera%20Mobile%2010,Palm%20Pre%201,Safari%204