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 48 forks source link

new config option IgnoreNearFutureJavascriptDisabled #174

Closed orand closed 12 years ago

orand commented 12 years ago

Hi Matt, we've been running into undesired behavior with IE in our dev environment after flushing the RR cache. We typically do this after we make changes to our .js files. If the next developer's browser to hit the site is IE, it will use a stale cached copy of the non-RR'd .js file and not even do a conditional GET to find out it has changed. The staleness issue can be solved by setting Cache-Control: max-age="0", but that would cause RR to add the .js files to the ignored URLs list because the URLs expire in less than 7 days. So I added a new config option to allow us to ensure all .js files are processed by RR regardless of the expiration timespan. Now we can set max-age="0" so the first browser to hit a site after flushing the RR cache is guaranteed to get the most recent version of the .js files.

If there's anything else I can do to improve this pull request just let me know and I'd be glad to do it. Thanks for creating such a useful tool and making it available to the community!

mwrock commented 12 years ago

Thanks Oran. This is certainly a good feature to add. The only thing I'd ask you to add is a test to JavascriptReducerFacts to make sure that if the setting is set to true, that the expiration is ignored. Thanks!

orand commented 12 years ago

Good call. Here you go!

mwrock commented 12 years ago

Accepted. Thanks!! Hope to push today.


From: "Oran Dennison" <reply+i-4332407-0bc060faf6fd1b4d0298a5ee8f8ad5de6a9cebf2-655165@reply.githu b.com>

Sent: Saturday, April 28, 2012 6:39 PM

To: "Matt Wrock" matt@mattwrock.com

Subject: SPAM-LOW: Re: [RequestReduce] new config option IgnoreNearFutureJavascriptDisabled (#174)

Good call. Here you go!


Reply to this email directly or view it on GitHub:

https://github.com/mwrock/RequestReduce/pull/174#issuecomment-5401842