简体   繁体   中英

Last-Modified date updated on every request of ScriptResource.axd and WebResource.axd

We have recently upgraded our ASP.NET solution from a hybrid .NET 3.5 Webforms and MVC 2 application to a .NET 4.5 Webforms and MVC 4 solution.

Whenever we request a Webforms page the Last-Modified response header is always updated for the ScriptResource.axd and WebResource.axd files. This slows our pages down as we always request a new resource instead of getting a 304 Not Modified from IIS.

I have checked the obvious things like compilation debug="false" and system.web.extensions scriptResourceHandler cacheControl="true". The cache-control and expires headers look fine. Its just the Last-Modified date changes with every request.

Any ideas on how to stop the Last-Modified being updated would be appreciated.

I was not able to figure out what the caused this problem.

I was able to work around this issue quickly and improve the websites performance by using the RequestReduce HttpModule that post processes page output to combine and minify the javascript.

Caching from the combined script worked as expected with the added benefit of reducing the number of requests and overall size of the download.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM