现在的位置: 首页 > 综合 > 正文

防刷新重复提交/防后退方法

2013年06月13日 ⁄ 综合 ⁄ 共 445字 ⁄ 字号 评论关闭

A)location.replace('newurl')

B)<body onbeforeunload="window.location.replace('')">

C) Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)

D)  <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
     <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
     <META HTTP-EQUIV="Expires" CONTENT="0">
E)  

     Response.Buffer=true;
     Response.ExpiresAbsolute=DateTime.Now.AddSeconds(-1);
     Response.Expires=0;
     Response.CacheControl="no-cache";

抱歉!评论已关闭.