我发现当按下后退按钮时,即使我发送以下标题,它也会从浏览器缓存中获取上一页:
Test1.aspx
- Server ASP.NET Development Server/9.0.0.0
- Date Wed,24 Mar 2010 17:49:40 GMT
- X-AspNet-Version 2.0.50727
- Location Test2.aspx
- Cache-Control no-cache,no-store
- Pragma no-cache
- Expires -1
- Content-Type text/html; charset=utf-8
- Content-Length 189
- Connection Close
解决方法
expires应该是一个日期时间戳和缓存控制“s”必须重新验证“&”max-age“也可能有帮助吗?
- Expires: Wed,11 Jan 1984 05:00:00 GMT
- Cache-Control: no-cache,must-revalidate,max-age=0