Safari浏览器忽略了我的无缓存 [英] Safari browser ignoring my no-cache
本文介绍了Safari浏览器忽略了我的无缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法强制页面始终在Safari中过期.Chrome,IE和Firefox都是不错的选择,但是Safari忽略了以下ASP.NET代码,就顺其自然:
I'm unable to force a page to always expire in Safari. Chrome, IE and Firefox are good citizens but Safari is cruising along just fine with ignoring the following ASP.NET code:
// Expire immediately
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
有什么建议吗?
推荐答案
信不信由你,让Safari始终重新加载页面的方法只是将其添加到body标签:
Believe it or not, the way to make Safari always reload the page was simply to add this to the body tag:
onunload=""
我在这里提到了这一点:>单击后退按钮时浏览器的onload事件?
I found a mention of this here: Is there a cross-browser onload event when clicking the back button?
这篇关于Safari浏览器忽略了我的无缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文