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

前端 未结 7 1889
情深已故
情深已故 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:05

    Just gotta clear the cache or hard refresh (Ctrl+F5) I'm afraid.

    Another option is to simply change the file name of the JS or CSS file so that FF doesn't recognize it as a cached file (e.g. rename style.css to style2.css).

提交回复
热议问题