如何停止缓存中的chrome [英] How to stop chrome from caching

查看:119
本文介绍了如何停止缓存中的chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在响应头文件中加入了以下内容:



 缓存控制:no-cache,必须重新验证
过期:-1
code>

这似乎适用于大多数浏览器,但不适用于坚持要返回缓存结果的Google Chrome。



那么有谁知道当用户按下后退按钮时,我如何强制浏览器从服务器获取页面?



谢谢。根据

id = 28035rel =noreferrer> crr repo中的这个bug报告,用户发现使用no-store而不是no-cache将会修复它。


I need to force the browser to reload the previous page from the server when the user presses the back button.

I've added the following to my response headers:

Cache-Control: no-cache, must-revalidate
Expires: -1

This seems to work for most browsers but not for Google Chrome that insists on returning the cached results.

So does anyone know how I force the browser to get the page from the server when the user presses the back button?

Thank you.

解决方案

as per this bug report in chromium repo, users find that using no-store instead of no-cache will fix it in chrome.

这篇关于如何停止缓存中的chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆