Clear cached JavaScript includes in Firefox

后端 未结 6 1670
生来不讨喜
生来不讨喜 2021-02-01 18:05

I\'m working on JavaScript for a site, developing with Firefox, and when I refresh the page, I don\'t see my changes. The JavaScript file is in an external file. I reloaded and

6条回答
  •  故里飘歌
    2021-02-01 18:35

    Shift-reload often clears out caches more aggressively. However, you really don't want to rely on this. A good technique is to version the filenames of your external Javascript, and update the HTML that refers to them when you rev. That way, you can rely on caching better as well (for example, setting cache headers to "public" in your webserver, and also specifying long Expires times).

提交回复
热议问题