ASP.NET 4.5 Bundling in Debug Mode - Stale Resources
Posted
by
RPM1984
on Stack Overflow
See other posts from Stack Overflow
or by RPM1984
Published on 2012-10-29T23:58:24Z
Indexed on
2012/10/30
17:01 UTC
Read the original article
Hit count: 303
Is there any way we can make the ASP.NET 4.5 Bundling functionality generate GUID's as part of the querystring when running in debug mode (e.g bundling turned OFF).
The problem is when developing locally, the scripts/CSS files are generated like this:
<script type="text/javascript" src="/Content/Scripts/myscript.js" />
So if i change that file, i need to do a hard-refresh (sometimes a few times) to get the file to be picked up by the browser - annoying.
Is there any way we can make it render out like this:
<script type="text/javascript" src="/Content/Scripts/myscript.js?v=x" />
Where x
is a GUID (e.g always unique).
Ideas?
I'm on ASP.NET MVC 4.
© Stack Overflow or respective owner