如何通过 meta 标签防止 Google Chrome 缓存页面?

3

有没有可能以编程方式防止Google Chrome缓存文件?

我想达到与Chrome开发者工具中的“禁用缓存”选项相同的效果。

主要问题是我正在使用外部脚本(无法由我更改),该脚本加载另一个脚本-在源URL中添加其他(随机生成的)参数对于该脚本不起作用。

到目前为止,我已尝试使用元标记:

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="cache-control" content="no-store" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1990 12:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

经过尝试不同的标签组合,我只能说Google Chrome完全忽略了它。
有什么办法可以做到这一点吗?
提前感谢。
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接