-1

One issue we are running into is that after we push out an update with new JavaScript files, the client browsers still use the cached version of the file and they do not see the update. Obviously, on a support call, we can simply inform them to do a ctrlF5 refresh to ensure that they get the up-to-date files from the server, but it would be preferable to handle this before that time.

I am using,

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate, 
max-age=0"/>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
mplungjan
  • 169,008
  • 28
  • 173
  • 236

1 Answers1

1

I think the best approach is to handle this by adding a salt to the assets generated (or even a version number) which is different in each build.

This way the file names will be different every time and the old cached file references will not be used.

Refer here

Dhananjai Pai
  • 5,914
  • 1
  • 10
  • 25
Giridhar
  • 46
  • 6