Stevesouders.com/docs/thinkvitamin-20101216.pptx Disclaimer: This content does not necessarily reflect the opinions of my employer. flickr.com/photos/ddfic/722634166/

Slides:



Advertisements
Similar presentations
Building Fast 3rd-Party Webapps O'Reilly Velocity Web Performance and Operations Conference 24 June Lessons.
Advertisements

Steve Souders Even Faster Websites Disclaimer: This content does not necessarily reflect.
17% 83% iGoogle, primed cache the importance of frontend performance 9%91% iGoogle, empty cache.
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.
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:
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 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 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
Stevesouders.com/docs/velocity-wpo pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
Lesson 12- Unit L Programming Web Pages with JavaScript.
Stevesouders.com/docs/sfjs pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
The Web Warrior Guide to Web Design Technologies
stevesouders.com/docs/accel-hpws pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.
Disclaimer: This content does not necessarily reflect the opinions of my employer.
High Performance Websites (Based on Steve Souder’s lecture) By Bhoomi Patel.
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/ /
Disclaimer: This content does not necessarily reflect the opinions of my employer.
 What I hate about you things people often do that hurt their Web site’s chances with search engines.
Performance, SEO, Accessibility Ivan Zhekov Telerik Corporation
Javascript and the Web Whys and Hows of Javascript.
Chris Pinski.  History  What is Ajax  Who uses Ajax  Underlying Technologies  SE Aspect  Common Problems  Conclusion.
Ajax (Asynchronous JavaScript and XML). AJAX  Enable asynchronous communication between a web client and a server.  A client is not blocked when an.
Copyright© 2002 Avaya Inc. All rights reserved Advanced Cross Site Scripting Evil XSS Anton Rager.
EPA Web Procedures and Standards October 26, 2010.
OFF Page SEO Tips & Tricks Step By Step By IT Team of SlideLearn.com.
Chapter 19: Adding JavaScript
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
DOM and JavaScript Aryo Pinandito.
Cross Site Integration “mashups” cross site scripting.
Javascript II DOM & JSON. In an effort to create increasingly interactive experiences on the web, programmers wanted access to the functionality of browsers.
Page Speed Bryan McQuade Richard Rabbat. Outline  What is Page Speed?  Inception of Page Speed  Cool features  Identify unused JavaScript and CSS.
Don't Let Third Parties Slow You Down Arvind Jain, Michael Kleber Google.
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
JQuery JavaScript is a powerful language but it is not always easy to work with. jQuery is a JavaScript library that helps with: – HTML document traversal.
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Web Technologies Lecture 7 Synchronous vs. asynchronous.
Trevor Jim Nikhil Swamy Michael Hicks Defeating Script Injection Attacks with Browser-Enforced Embedded Policies Jason FroehlichSeptember 24, 2008.
Rich Internet Applications 3. Client JavaScript. Document Object Model (DOM) The DOM, is an interface that allows scripts or programs to access and manipulate.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Javascript Overview. What is Javascript? May be one of the most popular programming languages ever Runs in the browser, not on the server All modern browsers.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
NCCUCS 軟體工程概論 Lecture 5: Ajax, Mashups April 29, 2014.
Unit M Programming Web Pages with
Unit M Programming Web Pages with
Intro to JavaScript CS 1150 Spring 2017.
Even Faster Web Sites best practices for faster pages
AJAX.
Even Faster Web Sites best practices for faster pages
Even Faster Web Sites cc:
Hints and tips for faster web apps
The Web Wizard’s Guide To JavaScript
High Performance Mobile
Week 5: Recap and Portfolio Site
Presentation transcript:

stevesouders.com/docs/thinkvitamin pptx Disclaimer: This content does not necessarily reflect the opinions of my employer. flickr.com/photos/ddfic/ /

flickr.com/photos/joshme17/ /

flickr.com/photos/dougbrown47/ //

#1. Speed: “First and foremost, we believe that speed is more than a feature. Speed is the most important feature.” carsonified.com/blog/business/fred-wilsons-10-golden-principles-of-successful-web-apps/

en.oreilly.com/velocity2009/public/schedule/detail/8523

slideshare.net/stoyan/yslow-20-presentation slideshare.net/stoyan/dont-make-me-wait-or-building-highperformance-web-applications

…shaved 2.2 seconds off the average page load time and increased download conversions by 15.4%! 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/7709

en.oreilly.com/velocity2008/public/schedule/detail/3632

Site speed in search rank Screen 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

flickr.com/photos/pedromourapinheiro/ /

flickr.com/photos/kevincollins / /

[next page being loaded] flickr.com/photos/kevincollins / /

Progressive Enhancement deliver HTML defer JS avoid DOM decorate later

Progressive Enhancement  Progressive Rendering

blocks parallel downloads and rendering 7 secs: IE 8-9, FF 3.6, Chr 6, Saf 4 9 secs: IE 6-7, FF 3.0, Chr 1, Op 9-10, Saf 3 Why focus on JavaScript?

JavaScript Functions Executed before onload K30% K34% K 7% K??% K35% K55% K29% en.wikipedia.org/wiki99 K19% K33% K16% 29% avg 229 K avg initial payload and execution

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 var xhrObj = getXHRObject(); xhrObj.onreadystatechange = function() { if ( xhrObj.readyState != 4 ) return; eval(xhrObj.responseText); }; xhrObj.open('GET', 'A.js', true); xhrObj.send('');

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

Meebo Iframed JS var iframe = document.createElement('iframe'); document.body.appendChild(iframe); var doc = iframe.contentWindow.document; doc.open().write(' '); doc.close(); loads asynchronously delays parent’s load event: FF, Chr, Saf great for 3 rd party scripts better for sandboxing & security avoids iframe src roundtrip

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

window.setTimeout( function(){ var a=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":" var c=a ? document.body : document.getElementsByTagName('head')[0]; var d=document.createElement('script'); d.type='text/javascript'; d.src=f; c.appendChild(d); Facebook

YUI.presentation.lazyScriptList = [" tute_0.1.9.js&arc/yui/oop_ js&[...58 more!...]"]; d = w.document; h = d.getElementsByTagName("head")[0]; n = d.createElement("script"), n.src = url; h.appendChild(n); Yahoo! FP

YouTube

[~40%] Amazon

subsequent page: Craigslist prefetching?

... eBay

$LAB.wait(function() { $LAB.script(" {... }); $LAB.script(" {... }); (new)Twitter

var a=_d.createElement("script"); a.type="text/javascript"; a.src=b; _d.getElementsByTagName("head")[0]. appendChild(a); Bing onload

Wikipedia

frontend SPOF (from NZ) 8.2 secs

Evolution of Script Loading scripts in HEAD block other downloads downloaded sequentially in IE 6-7 blocks rendering during download & parse-execute

Evolution of Script Loading move scripts to bottom (2007)... doesn’t block other downloads downloaded sequentially in IE 6-7 blocks rendering during download & parse-execute

Evolution of Script Loading load scripts async (2009) var se = document.createElement('script'); se.src = ' document.getElementsByTagName('head') [0].appendChild(se); doesn’t block other downloads downloaded in parallel (all browsers) blocks rendering during parse-execute

Evolution of Script Loading async + on-demand exec (2010) var se = new Image(); // or Object se.onload = registerScript(); se.src = ' separate download from parse-execute doesn’t block other download downloaded in parallel (all browsers) doesn’t block rendering until demanded phpied.com/preload-cssjavascript-without-execution/

Evolution of Script Loading 2011 <link rel=“prefetch” href=“A.js” onload=“registerScript()”> doesn’t block other download downloaded in parallel (all browsers) doesn’t block rendering until demanded easier

ControlJS a JavaScript module for making scripts load faster control.js loads async var cjsscript = document.createElement('script'); cjsscript.src = "control.js"; var cjssib = document.getElementsByTagName('script')[0]; cjssib.parentNode.insertBefore(cjsscript, cjssib);

ControlJS a JavaScript module for making scripts load faster just change HTML inline & external scripts var name = getName();

ControlJS a JavaScript module for making scripts load faster async downloads delays execution 1 st pass: if (IE || Opera) { new Image(); } else { document.createElement(‘object’); } 2 nd pass: external: document.createElement(‘script’); inline: window.execScript(sCode) or window.eval.call(window, sCode)

ControlJS a JavaScript module for making scripts load faster downloads w/ no execution later (if needed): CJS.execScript(src);

ControlJS a JavaScript module for making scripts load faster handles (some) document.write override document.write for each script set SPAN innerHTML if there’s a write parse out SCRIPT tags & add SCRIPT elem better solutions: Aptimize – GhostWriter – /ghostwriter-complete-control/

ControlJS a JavaScript module for making scripts load faster control.js loads async just change HTML inline & external scripts async downloads delays execution downloads w/ no execution handles (some) document.write

ControlJS a JavaScript module for making scripts load faster