Current time: 08-12-2020, 02:59 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Etag/Last Modified - the numpty question I've always wanted to know.
11-02-2010, 02:13 AM
Post: #4
RE: Etag/Last Modified - the numpty question I've always wanted to know.
(11-02-2010 01:43 AM)pmeenan Wrote:  Do you have a reference for the Google recommendation? All I could find was the Page Speed optimization docs: http://code.google.com/speed/page-speed/...serCaching and they don't seem to say anything specific about having both strong and weak headers.

Pat, this sentence is on that page:
"It is important to specify one of Expires or Cache-Control max-age, and one of Last-Modified or ETag, for all cacheable resources."

So yeah, send 1 strong one (Expires or CC) *and* one weak one (Last-Modified/ETag).
Imo, this is a good best practice.

The weak one will only kick in if the Expires has .... expired. The browser will then have a file in cache but is not sure if it may use it. So it sends a conditional request to the server, asking the server "hey dude, may I use this file or not?" and the server will respond with either a 304 "yeah man, go ahead" or a 200 "nope, here is a new one, use that and throw away the old".
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Etag/Last Modified - the numpty question I've always wanted to know. - aaronpeters - 11-02-2010 02:13 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)