Disclaimer: This content does not necessarily reflect the opinions of my employer.

Slides:



Advertisements
Similar presentations
High Performance Web Sites 14 rules for faster pages
Advertisements

Optimizing Websites with YSlow Tom Lianza Co-Founder Wishlisting.com Tom Lianza Co-Founder Wishlisting.com.
Building Fast 3rd-Party Webapps O'Reilly Velocity Web Performance and Operations Conference 24 June Lessons.
Steve Souders Even Faster Websites Disclaimer: This content does not necessarily reflect.
Steve Souders Even Faster Themes Disclaimer: This content does not necessarily reflect.
17% 83% iGoogle, primed cache the importance of frontend performance 9%91% iGoogle, empty cache.
High Performance Web Sites Essential Knowledge for Frontend Engineers
Steve Souders Even Faster Web Sites best practices for faster pages Disclaimer: This.
Steve Souders Even Faster Web Sites (inside ma.tt) best practices for faster pages.
17% 83% iGoogle, primed cache the importance of frontend performance 9%91% iGoogle, empty cache.
CS193H: High Performance Web Sites Lecture 22: Vol 2 – Optimize Images, Use Iframes Sparingly, Flush the Document Early Steve Souders Google
Steve Souders High Performance Widgets Disclaimer: This content does not necessarily.
Steve Souders Life's too short, write fast code part 1 Disclaimer: This content does.
Steve Souders Even Faster Web Sites best practices for faster pages Disclaimer:
CS193H: High Performance Web Sites Lecture 1: Introduction Steve Souders Google
17% 83% iGoogle, primed cache the importance of frontend performance 9%91% iGoogle, empty cache.
CS193H: High Performance Web Sites Lecture 17: Rule 14 – Make Ajax Cacheable Steve Souders Google
High Performance Web Sites Essential Knowledge for Frontend Engineers
Exceptional Performance Evolution at Yahoo! Steve Souders Chief Performance Yahoo!
Steve Souders Even Faster Web Sites Disclaimer: This content does not necessarily reflect.
Steve Souders Even Faster Web Sites best practices for faster pages Disclaimer: This content does not necessarily.
Steve Souders Life's too short, write fast code part 1 Disclaimer: This content does.
CS193H: High Performance Web Sites Lecture 20: Vol 2 – Don't Scatter Inline Scripts Steve Souders Google
Steve Souders Even Faster Web Sites best practices for faster pages Disclaimer: This content does not necessarily.
CS193H: High Performance Web Sites Lecture 12: Rule 8 – Make JavaScript and CSS External Steve Souders Google
CS193H: High Performance Web Sites Lecture 19: Vol 2 – Load Scripts Without Blocking Steve Souders Google
CS193H: High Performance Web Sites Lecture 10: Rule 6 – Put Scripts at the Bottom Steve Souders Google
CS193H: High Performance Web Sites Lecture 18: Vol 2 – Split the Initial Payload Steve Souders Google
Web Performance Meetup 1 Web Performance 101 Jeremy
Web Performance Meetup 1 Web Performance Toolbelt Jeremy
Stevesouders.com/docs/velocity-wpo pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
Web Site Performance What makes web sites slow? Back end Front end Tools for measuring performance Firebug / YSlow Visual Studio Test Edition W3.org html.
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
Improving Web Site Performance and Scalability While Saving Money Robert Boedigheimer ∙ Web Application
Stevesouders.com/docs/sfjs pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
stevesouders.com/docs/accel-hpws pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
1 Reproduction interdite. © ip-label 2012 Arnaud Becart ip-label.
High Performance Websites (Based on Steve Souder’s lecture) By Bhoomi Patel.
Front-end Performance Optimization Using Drupal Fixing all validation errors reported by the Yslow & Page Speed tools.Yslow Page Speed.
17% 83% iGoogle, primed cache the importance of frontend performance 9%91% iGoogle, empty cache.
Disclaimer: This content does not necessarily reflect the opinions of my employer.
Disclaimer: This content does not necessarily reflect the opinions of my employer.
&.zip Disclaimer: This content does not necessarily reflect the opinions of my employer.
Stevesouders.com/docs/velocity-efws pptx Disclaimer: This content does not necessarily reflect the opinions of my employer. flickr.com/photos/ddfic/ /
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
Disclaimer: This content does not necessarily reflect the opinions of my employer.
Performance, SEO, Accessibility Ivan Zhekov Telerik Corporation
Making your website go faster! Front-end Developer, Deeson Online Alli Price.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Stevesouders.com/docs/thinkvitamin pptx Disclaimer: This content does not necessarily reflect the opinions of my employer. flickr.com/photos/ddfic/ /
Web Performance Optimization Boban Stojanovski (Senior Front End Developer at Solaborate) Think Fast by default.
Page Speed Bryan McQuade Richard Rabbat. Outline  What is Page Speed?  Inception of Page Speed  Cool features  Identify unused JavaScript and CSS.
Web Performance and key business metrics Part II: More Findings from the Front Line of Web Acceleration.
Don't Let Third Parties Slow You Down Arvind Jain, Michael Kleber Google.
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Putting Performance Best Practices Together to Create the Perfect SPA Chris Love2Dev.com.
Case Study: Live Search – Moving to and then away from AJAX Eric Schurman Performance Development Lead Live Search Microsoft.
Web Technologies Lecture 7 Synchronous vs. asynchronous.
Intro to Web Performance Ten Ways to a Faster Website Presented by: Sheila Eaton and Mohammad Durrani TechKnowFile, University of Toronto, May 5, 2016.
Site Speed: The Ultimate UX Feature… for SEO. A case study on how to increase search engine crawling and online conversion Jonathon Colman In-House SEO.
Enhance Your Page Load Speed And Improve Traffic.
Time is the enemy: Ten Core Lessons for Achieving Peak
Information Systems 337 Prof. Harry Plantinga Assessment.
Even Faster Web Sites best practices for faster pages
Even Faster Web Sites best practices for faster pages
Even Faster Web Sites cc:
Tips for Website Speed Optimization
Hints and tips for faster web apps
High Performance Mobile
Yale Digital Conference 2019
Presentation transcript:

Disclaimer: This content does not necessarily reflect the opinions of my employer.

GMail Mobile: reducing.html SproutCore: Google, Bing biz metrics: Yahoo! biz metrics: Shopzilla biz metrics: Netflix outbound traffic: Google, Bing charts: up-websites-improves-online-business Aptimize WAX: speeding-up-sharepoint-microsoft-com.aspx Strangeloop Networks: speeding-up-websites-improves-online-business SproutCore: app-run-faster HTTP Archive Format: performance/

17% 83% iGoogle, primed cache the importance of frontend performance 9%91% iGoogle, empty cache

14 R ULES 1.M AKE FEWER HTTP REQUESTS 2.U SE A CDN 3.A DD AN E XPIRES HEADER 4.G ZIP COMPONENTS 5.P UT STYLESHEETS AT THE TOP 6.P UT SCRIPTS AT THE BOTTOM 7.A VOID CSS EXPRESSIONS 8.M AKE JS AND CSS EXTERNAL 9.R EDUCE DNS LOOKUPS 10.M INIFY JS 11.A VOID REDIRECTS 12.R EMOVE DUPLICATE SCRIPTS 13.C ONFIGURE ET AGS 14.M AKE AJAX CACHEABLE

Even Faster Web Sites Splitting the initial payload Loading scripts without blocking Coupling asynchronous scripts Positioning inline scripts Sharding dominant domains Flushing the document early Using iframes sparingly Simplifying CSS Selectors Understanding Ajax performance Doug Crockford Creating responsive web apps Ben Galbraith, Dion Almaer Writing efficient JavaScript Nicholas Zakas Scaling with Comet Dylan Schiemann Going beyond gzipping Tony Gentilcore Optimizing images Stoyan Stefanov, Nicole Sullivan

Google Mail

Google Docs

AOL

Twitter

ESPN

Best Buy

IKEA

CNN

Search

WebPagetest.org VA, UK, NZ IE7, IE8 Dial, DSL, FIOS empty, empty & primed quad core Pat Meenan (AOL)

News

Shopping

Sports

Progressive Enhancement deliver HTML defer JS avoid DOM decorate later

Progressive Enhancement  Progressive Rendering

AOL eBay Facebook MySpace Wikipedia Yahoo! Why focus on JavaScript? YouTube

scripts block blocks parallel downloads and rendering 7 secs: IE 8, FF 3.5, Chr 3, Saf 4 9 secs: IE 6-7, FF 3.0, Chr 1, Op 9-10, Saf 3

JavaScript Functions Executed before onload % search.live.com/results17K24% en.wikipedia.org/wiki114K32% % avg 252K avg initial payload and execution

splitting the initial payload split your JavaScript between what's needed to render the page and everything else defer "everything else" split manually (Page Speed), automatically (Microsoft Doloto) load scripts without blocking – how?

MSN Scripts and other resources downloaded in parallel! How? Secret sauce?! var p= g.getElementsByTagName("HEAD")[0]; var c=g.createElement("script"); c.type="text/javascript"; c.onreadystatechange=n; c.onerror=c.onload=k; c.src=e; p.appendChild(c) MSN.com: parallel scripts

Loading Scripts Without Blocking XHR Eval XHR Injection Script in Iframe Script DOM Element Script Defer document.write Script Tag

XHR Eval script & page must be same domain massage script? var xhrObj = getXHRObject(); xhrObj.onreadystatechange = function() { if ( xhrObj.readyState != 4 ) return; eval(xhrObj.responseText); }; xhrObj.open('GET', 'A.js', true); xhrObj.send('');

XHR Injection var xhrObj = getXHRObject(); xhrObj.onreadystatechange = function() { if ( xhrObj.readyState != 4 ) return; var se=document.createElement('script'); document.getElementsByTagName('head') [0].appendChild(se); se.text = xhrObj.responseText; }; xhrObj.open('GET', 'A.js', true); xhrObj.send(''); script must have same domain as main page

Script in Iframe <iframe src='A.html' width=0 height=0 frameborder=0 id=frame1> iframe must have same domain as main page must refactor script: // access iframe from main page window.frames[0].createNewDiv(); // access main page from iframe parent.document.createElement('div');

Script DOM Element var se = document.createElement('script'); se.src = ' document.getElementsByTagName('head') [0].appendChild(se); script & page domains can differ no need to massage JavaScript may not preserve execution order

GMail Mobile /* var... */ get script DOM element's text remove comments eval() when invoked inline or iframe awesome for prefetching JS that might (not) be needed

SproutCore var module1 = "..."; var module2 = "..."; eval() modules as needed 2 nd fastest downloading 2 nd fastest loading symbols best alternative

supported in IE and FF 3.1+ script and main page domains can differ no need to refactor JavaScript Script Defer

document.write(" "); parallelization only works in IE parallel downloads for scripts, nothing else all document.write s must be in same script block document.write Script Tag

browser busy indicators

|| down- loads domains can differ existing scripts browser busy ensures order size (bytes) normal Script Src noyes IE,FF ~50 XHR Eval IE,FFno ~500 XHR Injection IE,FFnoyesno ~500 Script in Iframe IE,FFno IE,FFno~50 Script DOM Element IE,FFyes FF ~200 Script Defer IEyes IE,FFIE~50 document.write Script Tag IE * yes IE,FFIE~100 * Only other document.write scripts are downloaded in parallel (in the same script block). Load Scripts Without Blocking

XHR Eval XHR Injection Script in iframe Script DOM Element Script Defer Script DOM Element Script Defer Script DOM Element Script DOM Element (FF) Script Defer (IE) XHR Eval XHR Injection Script in iframe Script DOM Element (IE) XHR Injection XHR Eval Script DOM Element (IE) Managed XHR Injection Managed XHR Eval Script DOM Element Managed XHR Injection Managed XHR Eval Script DOM Element (FF) Script Defer (IE) Managed XHR Eval Managed XHR Injection Script DOM Element (FF) Script Defer (IE) Managed XHR Eval Managed XHR Injection different domains same domains no order preserve orderno order no busy show busy no busy preserve order and the winner is...

stylesheets load in parallel with other resources......unless followed by an inline script put inline JS above stylesheets or below other resources use Link, bad: stylesheet followed by inline script

eBay MSN MySpace Wikipedia mispositioned inline scripts

Both combine scripts combine stylesheets add an Expires header gzip responses put stylesheets at the top put scripts at the bottom avoid CSS expressions make JS and CSS external reduce DNS lookups minify JS and CSS avoid redirects remove duplicate scripts make Ajax cacheable reduce cookie size use cookie-free domains don't scale images YSlow use CSS sprites use a CDN configure ETags use GET for Ajax requests reduce # of DOM elements no 404s avoid image filters optimize favicon Page Speed defer loading JS remove unused CSS use efficient CSS selectors optimize images optimize order of CSS & JS shard domains leverage proxy caching

Google sec searches  0.6%

Yahoo! sec traffic  5-9%

Bing +2 sec revenue  4.3%

Shopzilla -5 sec revenue  12% hw  50%

Netflix outbound bandwidth  43%

fast performance = better user experience more traffic more revenue reduced costs

so... why don't more people do it?

it's too hard!

"the hard is what makes it great" "if it wasn't hard everyone would do it"

this year's theme: Fast by Default

Aptimize WAX concatenate scripts concatenate stylesheets sprites, data: URIs far future Expires minify JS and CSS automatically in real time

WAX on: # requests empty: 96  35 # requests primed: 50  9 scripts  7, stylesheets  12, images  25 pages faster: 46-64% empty, 15-53% primed

Strangeloop Networks "typical ecommerce site" pages per visit: 11  16 time on site: 24  30 mins conversions:  16% order value:  5.5%

Rails far future Expires concatenate scripts domain sharding configure ETags in pipeline: async scripts, spriting, minification, flushing

SproutCore concatenate scripts concatenate stylesheets versioning (future Expires) stylesheets at the top scripts at the bottom minify JS & CSS remove dupe scripts

WPO

news

finds BG images groups into sprites generates sprite recomputes BG pos injects into page

Browserscope

HTTP Archive Format (HAR)

@font-face blocks rendering in IE if below SCRIPT tag declare above all SCRIPTs

Velocity OnLine Conference Dec 8, 9am-12:30pm PT Hooman Beheshti (StrangeLoop) Charles Jolley (SproutCore) Matt Cutts (Google) Artur Bergman (Wikia) Damien Katz (CouchDB)

focus on the frontend run YSlow and Page Speed! progressive enhancement  progressive rendering takeaways

Steve Souders

GMail Mobile: reducing.html SproutCore: Google, Bing biz metrics: Yahoo! biz metrics: Shopzilla biz metrics: Netflix outbound traffic: Google, Bing charts: up-websites-improves-online-business Aptimize WAX: speeding-up-sharepoint-microsoft-com.aspx Strangeloop Networks: speeding-up-websites-improves-online-business SproutCore: app-run-faster HTTP Archive Format: performance/