浏览器每次请求新文件不使用缓存方案

HTML

    <meta name="full-screen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="x5-fullscreen" content="true">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <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" />

CSS、 JavaScript

    const mathnum =  (Math.random() * 10);
    // 定义一个随机数变量  然后复制到link script路径后  ?+mathnum
    // 

image.png

每次请求都是不同的参数 触发更新请求最新文件

你可能感兴趣的:(Html,浏览器Google,html,前端,javascript)