c# - Clearing cache once on deploy -


i'm trying figure out how easiest way force endusers browser clear cache.

we working in visual studio .net webforms , angularjs

so every time deploy our .net project test or production enviroment got problems cache saving old javascript , hides new implementation...

i know couple solutions wanna see if there other?

thanks in advance!

right click in page , select view source, see static files suffixed follows:

<script src="//cdn.sstatic.net/js/stub.en.js?v=b1fcfe635df7"></script> 

basically kind of best method, generate suffix , append end of of static files querystring parameter. force browser thinking file new, i.e. if querystring has changed...

the rub here though how change files... how want force user download new static files... using generated timestamp force user download file everytime visit site, not ideal.... maybe use web.config date or it.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -