Force Firefox to Reload Page on Back Button

后端 未结 8 1720
孤独总比滥情好
孤独总比滥情好 2020-12-14 08:37

How do you make Firefox rerun javascript and reload the entire page when the user presses the back button? I was able to do this in all browsers except Firefox from the hel

8条回答
  •  盖世英雄少女心
    2020-12-14 09:08

    If your using c# .Net, you can handle it on the page load or init event programmatically

    Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
    Response.Cache.SetCacheability(HttpCacheability.Public);
    Response.Cache.SetValidUntilExpires(false);
    Response.Cache.VaryByParams["*"] = true;
    

    For more info, check out Response.Cache at MSDN: http://msdn.microsoft.com/en-us/library/system.web.httpresponse.cache(v=vs.110).aspx

提交回复
热议问题