-1

We have this problem that we need to tell our clients to clear their cache every time we have an update to our website.

Is it possible to clear our client`s cache through an event like clicking a button from Admin portal using Javascript or classic ASP?

P.S. I want to do this without disabling browser caching

4castle
  • 32,613
  • 11
  • 69
  • 106
JkAlombro
  • 1,696
  • 1
  • 16
  • 30
  • 2
    Possible duplicate of [Disabling browser caching for all browsers from ASP.NET](http://stackoverflow.com/questions/914027/disabling-browser-caching-for-all-browsers-from-asp-net) – Tigger Mar 15 '17 at 03:43

1 Answers1

1

I think it's not possible to clear client browser cache from Backend side. I suggest you add a version param for each static resource url when we deploy a new release. It will make the browser to load new ones. Ex:

Resource: http://abc.xyz/static/xx.js?...&version=1.0.xx
Vu.N
  • 149
  • 4
  • This would mean that I`ll need to change the versions every update. This would create problems like version tracking for each files and a pain if you have lots of js files. Any suggestion on how to deal with those? – JkAlombro Mar 15 '17 at 06:31
  • No, the trick is to append a parameter/string to the file name in the script tag. We don't need to store tracking version for each file. :) Example: – Vu.N Mar 15 '17 at 07:00