We have hybrid application that is still running part of the application with classic ASP along ASP.NET MVC. I would like to use bundled javascript and styles in classic ASP also.
In ASP.NET we can nicely use bundled stuff with caching nicely, we are using Script.Render, which adds version hash to the fetch url.
Thing is that this method of course isn't available in Classic ASP.
We can use bundled directly from html <script src="bundles/js?v=<%=version%>"/>
. version variable is classic ASP variable used in cache busting (force browser refresh). It is changed between versions.
Problem is that if classic ASP doesn't give right hash to bundle request, MVC bundling will return header caching: no-caching
, which will indicate to browser to not cache it.
Do you have any good ideas? Could that hash be computed in classic ASP? Could you tell bundling to allow caching without v=hash? Could v=hash be transferred from MVC in startup? We have mechanisms to transfer variables between Classic ASP and MVC, but is that hash some way reachable from MVC startup code.