如何让前端浏览器不进行缓存?

35 阅读1分钟

以下的meta标签法 有时候谷歌等浏览器不支持

<head>
     <meta charset="utf-8" />
     <!--设置过期时间设置0为直接过期并清除缓存-->
     <meta http-equiv="Expires" content="0">
     <!--设置不缓存页面-->
     <meta http-equiv="Pragma" content="no-cache">
    <!--设置不修改消息存储-->
    <meta http-equiv="Cache-control" content="no-cache">
    <!--同上-->
     <meta http-equiv="Cache" content="no-cache">
     <title>test</title>
</head>