0

We recently applied a patch to our ERP system that updated HTML, JavaScript and CSS files. After applying the patch a large volume of users called the help desk to report loss of functionality on the menu page.

The root cause was due to the user's browser (IE11) holding an old JavaScript file in the browser cache. Pressing F5 on the keyboard or clearing the cache resolves the issue since it forces the new version of the JavaScript file to be downloaded from the server.

However, instructing each user on how to clear the cache is not an option as there are several hundred thousand users of the ERP system.

My question: are there any server side settings that would force the browser to load the newest JavaScript file from the server (Apache)? Is there a best practice for situations like these?

We are aware that the browser settings can be changed to always load a new fIle but there are concerns around impact on network and server performance. Also, we can not use autoversioning due to support restrictions.

Any thoughts are appreciated.

extrata
  • 1
  • 1

2 Answers2

0

You need to look into HTTP conditional GET and how to implement that in your setup.

To resolve the current issue you have, you need to rename the JavaScript file in the software. However, you need to implement the conditional GET before doing that.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63
  • Thanks Tero. I will research that. Renaming the file may be problematic as it could void our support contract with the software provider. I appreciate the feedback. – extrata Oct 26 '17 at 20:40
  • 1
    In that case you need to contact the software provider on how to properly implement browser caching of their software. However, it is likely that they haven't looked into it at all, and simply assume all resources are always loaded from the server. – Tero Kilkanen Oct 27 '17 at 05:43
0

You can't solve your current problem with server-side configuration, because the clients aren't going to hit the server again because they've already cached the content. Thus, any changes you make to server won't get communicated to the client.

For the future, you should look into stripping or modifying the caching-related headers that the server is currently sending, so clients stop incorrectly caching stuff. Exactly what to do, and how, is dependent on the system, but the vendor should be able to provide guidance because that's what you're paying them for.

womble
  • 96,255
  • 29
  • 175
  • 230