With httpContext.Current.Response .Cache.SetCacheability(httpCacheability.Public) .Cache.SetRevalIDation(httpCacheRevalIDation.AllCaches) .Cache.SetLastModifIEd(Now) .Cache.SetExpires(DateTime.UtcNow.AddSeconds(120)) .Cache.SetMaxAge(TimeSpan.FromSeconds(120))End With
返回以下标题:
Cache-Control: public,no-cache="Set-cookie",must-revalIDate,max-age=120Content-Type: application/xml; charset=utf-8Expires: Mon,22 Aug 2016 13:54:36 GMTLast-ModifIEd: Mon,22 Aug 2016 13:52:36 GMT
但是我想弄清楚什么是设置no-cache =“Set-cookie”,我该怎样才能打开或关闭它?
解决方法 no-cache =“Set-cookie”告诉浏览器不要缓存服务器“Set-cookie”标头,而是对请求的其余部分遵循不同的规则.这是W3C的讨论
http://www.w3.org/Protocols/HTTP/Issues/cache-private.html
总结In http 1.1,Roy has proposed some features for the new cache-control directive that allow servers to selectively disable caching on specific headers. This would be,for example: cache-control: no-cache=”set-cookie”
以上是内存溢出为你收集整理的cache-control – 什么是设置no-cache =“Set-Cookie”全部内容,希望文章能够帮你解决cache-control – 什么是设置no-cache =“Set-Cookie”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)