Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我无法强制页面在 Safari 中始终过期。Chrome、IE 和 Firefox 是好公民,但 Safari 忽略了以下 ASP.NET 代码就可以正常运行:
// Expire immediately Response.Expires = 0; Response.Cache.SetNoStore(); Response.AppendHeader("Pragma", "no-cache");
有什么建议吗?
信不信由你,让 Safari 始终重新加载页面的方法只是将其添加到 body 标签中:
onunload=""
我发现这里提到了这一点:单击后退按钮时是否存在跨浏览器 onload 事件?