解决vue打包上线公众号,项目缓存问题

阅读 8

05-18 15:00

前端在入口页面index.html中加入以下代码,但是经过测试 ,好像只需要配置nginx就可以了

    <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="0">

nginx配置如下 

add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";

项目中遇到的问题,简单记录一下!!!

精彩评论(0)

0 0 举报