CS193H: High Performance Web Sites Lecture 7: Add an Expires Header Steve Souders Google

Slides:



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

Reflection nurulquran.com.
1
Worksheets.
High Performance Web Sites Essential Knowledge for Frontend Engineers
CS193H: High Performance Web Sites Lecture 16: Rule 13 – Configure ETags 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
CS193H: High Performance Web Sites Lecture 1: Introduction Steve Souders Google
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
High Performance Web Sites Essential Knowledge for Frontend Engineers
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
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 18: Vol 2 – Split the Initial Payload Steve Souders Google
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Addition and Subtraction Equations
Slide 1 FastFacts Feature Presentation October 16 th, 2008 We are using audio during this session, so please dial in to our conference line… Phone number:
David Burdett May 11, 2004 Package Binding for WS CDL.
Create an Application Title 1Y - Youth Chapter 5.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
CHAPTER 18 The Ankle and Lower Leg
Summative Math Test Algebra (28%) Geometry (29%)
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
The 5S numbers game..
Break Time Remaining 10:00.
The basics for simulations
Division- the bus stop method
PP Test Review Sections 6-1 to 6-6
MM4A6c: Apply the law of sines and the law of cosines.
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
CS193H: High Performance Web Sites Lecture 24: Vol 2 – CSS Descendant Selectors, Forced Compression Steve Souders Google
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Progressive Aerobic Cardiovascular Endurance Run
1..
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
Facebook Pages 101: Your Organization’s Foothold on the Social Web A Volunteer Leader Webinar Sponsored by CACO December 1, 2010 Andrew Gossen, Senior.
When you see… Find the zeros You think….
Before Between After.
2011 FRANKLIN COMMUNITY SURVEY YOUTH RISK BEHAVIOR GRADES 9-12 STUDENTS=332.
Slide R - 1 Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Prentice Hall Active Learning Lecture Slides For use with Classroom Response.
 Find the difference between the two numbers on the red boxes.  If the difference of the red boxes matches the blue box say “deal” f not, it’s “no.
Subtraction: Adding UP
: 3 00.
5 minutes.
Numeracy Resources for KS2
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Static Equilibrium; Elasticity and Fracture
Essential Cell Biology
Converting a Fraction to %
Resistência dos Materiais, 5ª ed.
Clock will move after 1 minute
PSSA Preparation.
Select a time to count down from the clock above
Troubleshooting using HTTP Headers
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Schutzvermerk nach DIN 34 beachten 05/04/15 Seite 1 Training EPAM and CANopen Basic Solution: Password * * Level 1 Level 2 * Level 3 Password2 IP-Adr.
Presentation transcript:

CS193H: High Performance Web Sites Lecture 7: Add an Expires Header Steve Souders Google

Announcements No more hardcopy handouts – view/annotate online

Expires header Expiration date determines freshness. Can also use Cache-Control: max-age GET /v-app/scripts/ dom.common.js HTTP/1.1 Host: User-Agent: Mozilla/5.0 (…) Gecko/ Firefox/3.0.1 Accept-Encoding: gzip,deflate HTTP/ OK Content-Type: application/x-javascript Last-Modified: Mon, 22 Sep :14:35 GMT Content-Length: 2066 Content-Encoding: gzip Expires: Mon, 12 Oct :57:34 GMT Cache-Control: max-age= XmoÛHþ\ÿFÖvã*wØoq...

Expires vs. max-age Expires works in HTTP/1.0, max-age in HTTP/1.1 Expires is an absolute date: 12 Oct :57:34 GMT max-age is # of seconds until expiration: Expires relies on clock synchronization between client and server for short expirations max-age takes precedence over Expires

Sending Expires (Apache) mod_expires ExpiresDefault "access plus 1 year" sends both Expires and max-age: Expires: Mon, 12 Oct :57:34 GMT Cache-Control: max-age=

Expires in the Wild – 2007 ImagesScriptsStylesheets % with Expires Median Age amazon.com 0/620/30/10%114 days aol.com 23/436/181/148%217 days cnn.com 0/1382/110/21%227 days ebay.com 16/200/70/255%140 days froogle.google.com 1/230/1 4%454 days msn.com 32/353/91/180%34 days myspace.com 0/180/2 0%1 day wikipedia.org 6/82/31/175%1 day yahoo.com 23/234/41/1100%na youtube.com 0/320/70/30%26 days average 10/40 (25%) 2/5 (38%) 0.5/2 (27%) 12/46 (26%) March 2007

Expires in the Wild – 2008 ImagesScriptsStylesheets % with Expires Median Age aol.com 26/3513/201/171%189 days ebay.com 48/486/72/298%1 day facebook.com 93/9720/2220/2096%121 days google.com/search 1/10/10/050%1 day search.live.com/results 6/61/14/4100%na msn.com 45/453/3 100%na myspace.com 21/217/74/4100%na en.wikipedia.org/wiki 7/325/59/946%310 days yahoo.com 23/234/41/1100%na youtube.com 8/271/1 34%unk average 28/34 (83%) 6/7 (85%) 5/5 (100%) 38/45 (85%) October 2008

Revving Filenames really, this is independent of Expires headers once you make a resource public, you can never change it => aggressive proxies prevent 100% of users from getting the update best solution: change the filename date: trough_ gif version #: onload_1.6.1.js checksum: dom.common.js don't use querystring: wikibits.js?179 won't be cached by some proxies

Homework "Improving Top Site" class project: first set of improvements due by 23:59 Mon 10/22 THIS WILL AFFECT YOUR GRADE includes improvements from Rules 1-4 measure improvements using Hammerhead record results in your personal Web 100 sheet include URLs that I can check (in your sheet) read Chapter 4 of HPWS for 10/15

Questions What's are some differences between Expires and max-age? What types of resources should an Expires header be used with? Once a resource is cached with a far future expiration date, how can you push updates and ensure users get the new version?