用window.open打开子页面时,如何每次都重新加载子页面,而不是读取历史页面。
因为有时会在子页面更新数据
------解决方案--------------------------------------------------------
url后加一随机参数,不然会去读缓存
------解决方案--------------------------------------------------------
#region 清空客户端页面缓存
public static void ClearClientPageCache()
{
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Expires = 0;
HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
HttpContext.Current.Response.AddHeader("pragma", "no-cache");
HttpContext.Current.Response.AddHeader("cache-control", "private");
HttpContext.Current.Response.CacheControl = "no-cache";
}
#endregion
- HTML code
window.open("xxx.aspx?id=1&Value=" + xxx + "", "", "height=550, width=850, top=100, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no");