mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 49 forks source link

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

Open candrews opened 12 years ago

candrews commented 12 years ago

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.

mwrock commented 12 years ago

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?

candrews commented 12 years ago

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 :-)