我有一些缓存问题。
我正在运行一个很小的Web应用程序,该应用程序读取一帧并将其保存到磁盘,然后在浏览器窗口中显示。
我知道,这可能不是最好的解决方案,但是每次我以相同的名称保存此读取帧时,浏览器都会对其进行缓存。
我尝试使用html元标记,但没有成功:
<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" />
另外,我已经尝试过这一步骤(特定于flask):
resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
resp.headers["Pragma"] = "no-cache"
resp.headers["Expires"] = "0"
这是我尝试修改 resp 标头的方式:
r = make_response(render_template('video.html', video_info=video_info))
r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
r.headers["Pragma"] = "no-cache"
r.headers["Expires"] = "0"
仍然在Google Chrome和Safari中进行缓存。 这里可能是什么问题?