I know that Expires header should not be greater than 1 year from the current date, but is there any such limitations for the Cache-Control max-age header?
Couldnt spot any such mention in sections 14.9.3 and 14.9.4 of the HTTP/1.1 spec.
Is there any negative effect on any browser if someone has their max-age set to 10 years?
Anyone do any cross-browser testing regarding this?
This would be interesting from a standards implementation point of view… but it is meaningless in the real world. A year is far more time than you’ll ever need. Even if your content doesn’t change for 10 years, or one year, the user’s cache is far more likely to be emptied in between that time, rendering any time longer meaningless.
So, if I understand correctly there is no DISadvantage if the expires-tag says 10 years or 20 years?
Although Jarrod’s explaination is logical, I don’t see why 1 year would be maybe better dan 10 years …
Sorry for the long delay in response, been busy. I agree, there “probably” is no disadvantage, from a logical standpoint… However, I would be cautious. Usually if something is not standardized browsers tend to implement such things with little consistency, and sometimes without thought to possible issues. As such, my fear would be that a specific browser may not actually recognize an expires that far into the future (perhaps the programmer thought 5 years would be the most anyone would use), and instead would default to a smaller time or not may not function at all. Purely conjecture, but something to think about.