Why does Firefox sometimes cache my CSS & Javascript code, even though it has changed?

前端 未结 7 1950
情深已故
情深已故 2021-01-12 21:20

On my product site, Firefox sometimes \"doesnt detect\" changes in my CSS & Javascript code. Rather it loads the old versions, so it seems that I need to clear the cache

7条回答
  •  遥遥无期
    2021-01-12 22:18

    If you are using a server-side language you could use a trick. You can append a string after .css/.js. In PHP for example:

    
    

    It changes every page reload.

    Take a look at this article about cache busting.

提交回复
热议问题