如何打回浏览器(IE,Chrome浏览器,火狐Safari浏览器)按钮时刷新页面? [英] How to refresh page when hitting back button on browser (IE,Chrome,Firefox Safari)?
本文介绍了如何打回浏览器(IE,Chrome浏览器,火狐Safari浏览器)按钮时刷新页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大多数浏览器加载从缓存中的网页,不执行往返服务器更新。
我说Response.AppendHeader(缓存控制,无店)上的Page_Load但不工作的Chrome,Firefox和Safari。
如何回击浏览器上的按钮时,页面刷新(IE,Chrome浏览器,火狐Safari浏览器)?
Most browsers reload the page from cache and do not perform a round trip server refresh. I added Response.AppendHeader("Cache-Control", "no-store") on Page_Load but not working for Chrome, Firefox, Safari. How to refresh page when hitting back button on browser (IE,Chrome,Firefox Safari) ?
推荐答案
这将是你的C#code我假设。
以上是我以建议的大部分建议最少。
This would be for your c# code I'm assuming. These are my suggestions in order of most suggested to least.
Response.Cache.SetNoStore();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.AppendHeader("pragma","no-cache");
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
这篇关于如何打回浏览器(IE,Chrome浏览器,火狐Safari浏览器)按钮时刷新页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文