Google Chrome’s caching woes

We’ve run into an issue with Google’s Chrome browser while working on a new feature on one of our internal projects. It turns out Google’s famous and popular browser Chrome caches javascript and css files quote aggressively and would not refresh the cache even when adding an additional random parameter such as in the example below:

<script type="text/javascript" src="/js/some-javascript-file.js?nocache=12345678"></script>
What worked for us is a solution we found in this discussion on Chromium’s issues list:

<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="Pragma" content="no-store, no-cache" />
<meta http-equiv="Expires" content="0" />

Just add these tags to your website’s html head section and you should be good to go.

 

See examples of exceptional work we have done for our clients

View case studies

GET IN TOUCH

Contact us to discuss your next project:

+44 (0) 20 8090 0828
info@atomate.net

Contact us now