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

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

    • You can use a meta tag to force the refreshing. , or .
    • You can force the HTTP header: Cache-control: no-cache or Pragma: no-cache.
    • You can append a random query string to your CSS and JavaScript files.

提交回复
热议问题