Current time: 08-12-2020, 02:57 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.
02-04-2011, 05:08 PM
Post: #16
RE: Etag/Last Modified - the numpty question I've always wanted to know.
(02-04-2011 08:23 AM)Geebee Wrote:  Thanks for the great info. I now get the 'unconditional' and 'conditional' bit :-).

Some check questions:
- Etag is difficult to use with a multi-server config, right?

Well, not really. You would just have to change the standard configuration to drop the INode part of the Etag. But if you have your caching headers configured properly, I do not see a reason, why you should use Etags at all.

(02-04-2011 08:23 AM)Geebee Wrote:  - is the setting Cache-control: public important?

This header serves two purposes:
a) It allows a shared cache to store the object as well. As an example, AOL users coming to your site are using a shared cache, when using the built-in browser. So if AOL user A has visited your site, AOL caches are storing the object. If then AOL user B is visiting your site, the object would be served from the shared AOL cache, not from your site.
This might become a grey area, if it is "cookied" content. Some shared caches might decide not to store the asset if it is cookied. Others will.

b) It allows Firefox when using an SSL connection to store the object in the disk cache. If the header is missing, it would be stored in memory cache and purged, when the user closes Firefox.

(02-04-2011 08:23 AM)Geebee Wrote:  - we use the Cache-control Max-age as an absolute value (600 seconds) instead of a relative value, next to a relative Expire setting. Can that be a problem? Should I fix that? It works well as far as I can see...

Shouldn't be a problem. Especially, if I recall correctly, as according to the RFC, Cache-Control beats Expires. So if you have both, and the browser is talking HTTP1.1, the browser would simply ignore the Expires Header. If it is HTTP1.0, it would ignore the Cache-Control Header.
But 600 seconds seems rather short. Might be a good idea to start versioning your assets and have a much larger TTL like 1 year.
See also here:
Souders on Versioning

Hope that helps a bit!

Kind regards,
Markus
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. - LeptienM - 02-04-2011 05:08 PM

Forum Jump:


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