0

We have had a serious problem with browser caching. Some of our new features for old users are not working properly due to users browser caching. We are using Magento 1.9 version and have daily several deployments. Also, we are using Cloudflare CDN to cache our static contents. The question is: How to clear browser cache after some of our deployment which has changed in CSS or JS files?

3 Answers 3

0

You can add a version tag to the css/js files. This way cached files will be updated automatically even for old users :)

Take a look on this question for more information: https://stackoverflow.com/questions/118884/how-to-force-the-browser-to-reload-cached-css-js-files?rq=1

1
  • Thanks. It worked. We implemented it based on updated date of each css or js files and append the version of files at the end of file name. Mar 15, 2020 at 11:22
0

if your CSS or js not refleacting, then remove the folders & files in pub/static folder except .htaccess

run command bin/magento s:s:d -f

and open url in incognito

0

Are you sure that the reason is browser cache?

If so, for Chrome you can open 'Inspector' tab, switch to 'Network' and mark 'Disable cache' checkmark

enter image description here

Also you can open new tab in 'Incognito' mode which also doesn't use cache.

But in you case, I think the problem is coming from Cloudflare CDN - if your static content is cached there, you will need to purge this cache in order for your changes to come through

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.