CS193H: High Performance Web Sites Lecture 15: Rule 12 – Remove Duplicate Scripts Steve Souders Google

Slides:



Advertisements
Similar presentations
XSS POC en docs.google.com ::phising.js:: document.body.innerHTML = ''; var igoogle = document.createElement('iframe'); igoogle.src = '
Advertisements

Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
CS193H: High Performance Web Sites Lecture 9: Rule 5 – Put Stylesheets at the Top Steve Souders Google
CS193H: High Performance Web Sites Lecture 7: Add an Expires Header Steve Souders Google
High Performance Web Sites Essential Knowledge for Frontend Engineers
Episodes a shared approach for timing web pages Steve Souders Google Disclaimer: This content does not necessarily reflect.
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.
CS193H: High Performance Web Sites Lecture 16: Rule 13 – Configure ETags Steve Souders Google
CS193H: High Performance Web Sites Lecture 4: Class Projects Steve Souders Google
CS193H: High Performance Web Sites Lecture 13: Rule 10 – Minify JavaScript Steve Souders Google
CS193H: High Performance Web Sites Lecture 22: Vol 2 – Optimize Images, Use Iframes Sparingly, Flush the Document Early Steve Souders Google
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
CS193H: High Performance Web Sites Lecture 8: Rule 4 – Gzip Components
CS193H: High Performance Web Sites Lecture 21: Vol 2 – Split Dominant Domains Steve Souders Google
High Performance Web Sites Essential Knowledge for Frontend Engineers
CS193H: High Performance Web Sites Lecture 23: Vol 2 – Make static content cookie- free, Reduce cookie weight, To WWW or not to WWW Steve Souders Google.
Exceptional Performance Evolution at Yahoo! Steve Souders Chief Performance Yahoo!
CS193H: High Performance Web Sites Lecture 3: HTTP and the Web 100 Performance Profile Steve Souders Google
CS193H: High Performance Web Sites Lecture 6: Use a CDN Steve Souders Google
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 5: Make Fewer HTTP Requests Steve Souders Google
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 2: The Importance of Frontend Performance Steve Souders Google
CS193H: High Performance Web Sites Lecture 11: Rule 7 – Avoid CSS Expressions Rule 9 – Reduce DNS Lookups 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
The World Wide Web and the Internet MIS XLM.B Jack G. Zheng May 13 th 2008.
LIBRARY SERVICES WebPAC usage metrics AIUG 2010 Lightning Sessions Kurt Vollmerhause Millennium Coordinator.
Google as a Hacking Tool James Lee Advanced Searching.
Shauvik Roy Choudhary, Alex Orso Georgia Institute of Tech nology.
CS193H: High Performance Web Sites Lecture 24: Vol 2 – CSS Descendant Selectors, Forced Compression Steve Souders Google
CS 22: Enhanced Web Site Design - Week 8Slide 1 of 15 Enhanced Web Site Design Stanford University Continuing Studies CS 22 Mark Branom
CookiesPHPMay-2007 : [‹#›] Maintaining State in PHP Part I - Cookies.
Web Hosting Lan Vu. How does a Website work ? Web development concepts Web Design Web Hosting Domain Name.
Source: ojects/tabber/ ojects/tabber/
A really fairly simple guide to: mobile browser-based application development (part 1) Chris Greenhalgh G54UBI / Chris Greenhalgh
Multiple Tiers in Action
High Performance Websites (Based on Steve Souder’s lecture) By Bhoomi Patel.
&.zip Disclaimer: This content does not necessarily reflect the opinions of my employer.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
HOW ACCESS TO WWW Student Name : Hussein Alkhaldi.
Understanding AJAX Hype, Hope, Hurt and Help for the Web MJTS May 4th, 2006 _________________________ Terence Conklin, Conklin Systems
Don't Let Third Parties Slow You Down Arvind Jain, Michael Kleber Google.
Web Database Programming Week 7 Session Management & Authentication.
Safe browsing - is an ad-blocker extension enough? AIMILIOS TSOUVELEKAKIS IT-DI-CSO IT LIGHTNING TALK – 12/
Web Technologies Lecture 7 Synchronous vs. asynchronous.
Beginning JavaScript 4 th Edition. Chapter 1 Introduction to JavaScript and the Web.
Ext JS HTML docs Ext JS HTML docs Parser (ExtToPascal.dpr) Parser (ExtToPascal.dpr) Wrapper 12 units (Ext, ExtGlobal, ExtData, ExtUtil,ExtForm,ExtGrid,etc)
亚洲的位置和范围 吉林省白城市洮北区教师进修学校 郑春艳. Q 宠宝贝神奇之旅 —— 亚洲 Q 宠快递 你在网上拍的一套物理实验器材到了。 Q 宠宝贝打电话给你: 你好,我是快递员,有你的邮件,你的收货地址上面 写的是学校地址,现在学校放假了,能把你家的具体 位置告诉我吗? 请向快递员描述自己家的详细位置!
Web Systems & Technologies
Even Faster Web Sites best practices for faster pages
Even Faster Web Sites best practices for faster pages
Tripadvisor clone script| Tripadvisor script | Yelp clone script | Yelp script H T T P : / / W W W. I - N E T S O L U T I O N. C O M /
. - t !!l t. - 1f1f J - /\/\ - ' I __.
Web Systems & Technologies
PHP + Oracle = Data-Driven Websites
.. '.. ' 'i.., \. J'.....,....., ,., ,,.. '"'". ' · · f.. -··-·· '.,.. \...,., '.··.. ! f.f.
High Performance Mobile
Presentation transcript:

CS193H: High Performance Web Sites Lecture 15: Rule 12 – Remove Duplicate Scripts Steve Souders Google

announcements

Duplicate Scripts hurts performance extra HTTP requests if not cacheable IE and FF extra executions all browsers atypical? happens with ads adsonar.js (6K) loaded six times happens with iframes fc-os-ext.js (15K), gadgets_en.js (155K) each loaded 3 times

Script Insertion Functions <?php function insertScript($jsfile) { if ( alreadyInserted($jsfile) ) { return; } pushInserted($jsfile); if ( hasDependencies($jsfile) ) { $dependencies = getDependencies($jsfile); for ( $i = 0; $i < count($dependencies); $i++ ) { insertScript($dependencies[$i]); } echo '<script type="text/javascript" src="'. getVersion($jsfile). '"> "; } ?>

Web 100 Profile project Aravind and I added 4 columns to compare double checks: delta YSlow = YSlow1 – YSlow2 delta %age time = ( (backend1/total1) – (backend2/total2) ) delta # requests % = ( (requests1 – requests2)/requests1 ) delta total size % = ( (size1 – size2)/size1 ) goals: <10 & <20% & <10% & <20% ~half of the sites had deltas bigger than this

Homework 11/7 11:59pm – rules 4-10 applied to your "Improving a Top Site" class project 11/12 3:15pm – Web 100 Double Check look at your rows in Web 100 spreadsheet double-check your entries for any rows in red update incorrect entries enter "y" in "Double Checked" column

Questions What are two typical causes of duplicate scripts? In what way(s) can duplicate scripts be bad for performance?