Description:I have studied about cache busting techniques and came to know that there are mainly three such techniques.
-File name versioning (e.g. style.v2.css)
-File path versioning (e.g. /v2/style.css)
-Query strings (e.g. style.css?version=2)
Currently I am using the query string for cache busting which is implemented by default in mvc's Bundling and Minification but the query string technique is causing performance issues, so I need to implement any of the other two technique.
Need help in this regard!!!
Posted by: Umer khan | Posted on: Aug 24, 2018
4
There is a simple 4 steps implementation of the "File path versioning" cache busting technique as follows.
Step1:
Add the following lines of code in the web.config’s <system.webServer> element:
Step2:
create a class "CacheBuster" with the method "GetVersionedPath" as shown in the following chunk of code.
Step3
Call the method in such a way.
Step4:
Then by using the url rewrite module of IIS by adding the following snippet of XML to the web.config’s <system.webServer> section
Full example can be seen in the article Implementation of cache busting technique in ASP.NET
Replied by: Tabish Usman | Replied on: Aug 27, 2018