Aggressive JavaScript caching

前端 未结 9 1003
北荒
北荒 2020-12-24 08:45

I\'ve run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn\'t see the changes. It holds onto the copy

9条回答
  •  离开以前
    2020-12-24 09:09

    is your webserver sending the right headers to tell the browser it has a new version? I've also added the date to the querystring before. ie myscripts.js?date=4/14/2008 12:45:03 (only the date would be encoded)

提交回复
热议问题