How to force a browser to refresh a cached version of a webpage

前端 未结 9 572
粉色の甜心
粉色の甜心 2020-12-08 10:06

I have a website that because of an ill-prepared apache conf file has instructed users to cache a website URL several years into the future. As a result, when a person visit

9条回答
  •  -上瘾入骨i
    2020-12-08 10:59

    The browsers are using the cache for optimizing calls to the servers, in the case of any update of your build production you have to force browser to refresh resources from the server just like use f5 to clear the cache.

    The solution for that you should add some parameters to your meta-includes (URLs) by the way the browser will not find the resources in the cache with such parameter so it will refresh them from the server.

    You can parameter your includes per version for example like the below :

    
    
    

提交回复
热议问题