0

When I push update js files or code to server , I have to clean the cache each time to see the changes on my web site.

I am using this meta tags on my master page

  <meta http-equiv="x-ua-compatible" content="IE=8">
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='-1'>
<meta http-equiv='pragma' content='no-cache'>

but still having same issue.

Is there any way to resolve this issue ?

akaminko
  • 71
  • 1
  • 2
  • 11
  • 1
    You also need to have a `Cache-control: no-cache` header on your JavaScript file. – Daniel Weiner Feb 04 '15 at 15:54
  • header('Cache-Control: no-cache, must-revalidate'); do you know how to include this in js file ? – akaminko Feb 04 '15 at 16:04
  • There's no way to do this in the JS file itself; It depends on your server architecture and/or server programming language. Are you using Apache? – Daniel Weiner Feb 04 '15 at 16:05
  • 1
    You can follow the instructions [Here](http://stackoverflow.com/questions/642954/iis7-cache-control) to set cache-control headers on files in you javascript directory. – Daniel Weiner Feb 04 '15 at 16:11
  • You really should be updating the path to the file with a querystring. Easy to do if you have a build system. You really do not want to make your files un-cachable. Making everything not cache is asking for slower performance. – epascarello Feb 04 '15 at 16:12

0 Answers0