1

I have a website and consider the situation where users are using it. I push new code on production with new css. Consider the situation where users close their browser and open and come to the same page again, they are still getting old css here. And thus the page does not appear properly.

How can i make sure that new css is loading too. It does not work with chrome, it works with mozilla. When i do ctrl+F5, it works. But users wont refresh the cache right. Even if i close browser and open again, it is old css unless i remove the cache/cookies.

Can someone help me out on this.

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
NewCoder
  • 59
  • 1
  • 6

1 Answers1

4

A technique to solve this issue is called cache busting. A simple method of cache busting is to append a unique string to the end of a file name such that it appears as a new file to the browser or entity which is caching it.

Heres a link for more techniques:

Cache busting techniques

rjustin
  • 1,399
  • 8
  • 19