JavaScript file not updating no matter what I do

前端 未结 13 741
粉色の甜心
粉色の甜心 2021-01-30 03:14

I have an external JavaScript file and whether in FireFox or Chrome, whether all browsing data is cleared, it will NOT update no matter what. I believe something happen

13条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 03:27

    I've had this problem before, it's very frustrating but I found a work around. Type in the full address of the js file (i.e. yourhost.com/javascript.js) and load it. You will probably see the old version load. Then hit f5 to refresh that page and you should see the new version load. The js file will now be updated in your cache and the code should run as you expect.

提交回复
热议问题