注销后停止在浏览器中保存网页 [英] Stop web page save in browser after logout

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

问题描述

请建议我注销后如何停止在浏览器中保存网页.

我已经使用了一些代码.
请说出正确的方法
紧急情况

Session.Clear();
Session.Abandon();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
Response.Cache.SetNoStore()





在此先感谢代码项目团队

Please suggest me that how can i stop to save my web pages on browser after logout.

i have use some code .
Please tell its right way or not
ITS URGENT

Session.Clear();
Session.Abandon();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(1));
Response.Cache.SetNoStore()





Thanks in advance code project team

推荐答案

您可以防止从网站上加载任何内容,并可以防止缓存.即使缓存不起作用,也无法防止保存任何已加载的资源.而且您无法避免保存已经缓存的任何内容.

随便看看:所有数据都已经在客户端站点上了.有什么可能会阻止用户使用它?它已经在那里.服务器代码无论是什么,都无法对此数据进行任何控制.

由于问题仅与页面保存"有关,而不是根据某些权限进行缓存,身份验证或对资源的访问,因此答案是:不,您无法停止它".

—SA
You can prevent loading of anything from the Web site and you can prevent caching. You cannot prevent saving of any resources which are already loaded, even if caching is not working. And you cannot prevent saving anything which is already cached.

Just thing about it: all the data is already on the client site. What can possibly prevent the user from using it? It''s already there. The server code, whatever it is, does not have any control over this data.

As the question is just about "page save", not caching, authentication or access to resourced according to some permission, the answer is: "no, you cannot stop it".

—SA


这篇关于注销后停止在浏览器中保存网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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