RequestReduce icon indicating copy to clipboard operation
RequestReduce copied to clipboard

Expires/max-age is used for Javascript, but not for CSS

Open candrews opened this issue 13 years ago • 2 comments

If a Javascript resource has an expiration or a max-age of less than 7 days, it's not considered by Request Reduce.

CSS does not have this rule.

This inconsistency confused me... it seems less than ideal. All resources should probably be handled consistently.

candrews avatar Jun 06 '12 20:06 candrews

I can see why this would be confusing. The reason why I treat css differently is that many people may have near future expiring css but don't really intend to do so. I've seen this happen alot and I find that css is not intentionally given near future expirations nearly as often as JS and the consequences of not honoring js expirations are far more negative. Thoughts?

mwrock avatar Jun 08 '12 12:06 mwrock

I think that when software starts doing what it thinks is probably right, and not what it's told, one tends to run into interesting, confusing situations. If an HTTP request returns response headers indicating that it shouldn't be cached, but it ends up cached - that seems bad. It's not what someone would expect - it violates the so-called Principle of Least Surprise. So that's my opinion :-)

candrews avatar Jun 08 '12 18:06 candrews