浏览器中的页面缓存问题 [英] Page Caching In Browser problem

查看:70
本文介绍了浏览器中的页面缓存问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

meta http-equiv='cache-control' content='no-cache'>
meta http-equiv='expires' content='0'>
meta http-equiv='pragma' content='no-cache'>


Response.AppendHeader("Cache-Control", "no-cache, no-store, must-revalidate"); 
Response.AppendHeader("Pragma", "no-cache"); 
Response.AppendHeader("Expires", "0");



我们有缓存防止编码在代理浏览器上不起作用.如何为Opera和其他代理浏览器修复此问题



We have Cache preventing coding which is not working on proxy browsers.How to fix this for opera and other proxy browsers

推荐答案

The Meta tags:
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">

And the code:
    Response.ExpiresAbsolute = DateTime.Now
    Response.Expires = -1441
    Response.CacheControl = "no-cache"
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("Pragma", "no-store")
    Response.AddHeader("cache-control", "no-cache")
    Response.Cache.SetCacheability(HttpCacheability.NoCache)
    Response.Cache.SetNoServerCaching()


这篇关于浏览器中的页面缓存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆