简体   繁体   English

使用ASP.NET清除浏览器关闭时的服务器缓存

[英]Clear Server Cache on Browser Close Using ASP.NET

对于安全的Web应用程序,如何清除浏览器服务器缓存中的项目关闭。

You could try using the Session object and use it Session_End method to detect when the session is over and then do the cleanup. 您可以尝试使用Session对象,并使用它的Session_End方法检测会话结束的时间,然后进行清理。

More info about the session object you can find here - http://www.codeproject.com/KB/aspnet/ExploringSession.aspx 您可以在这里找到有关会话对象的更多信息-http: //www.codeproject.com/KB/aspnet/ExploringSession.aspx

I'd use a small timeout so that the cache will clear almost immediately when the session is over. 我会使用一个小的超时时间,以便会话结束时几乎立即清除缓存。 I might be wrong here - so if any one can help, it would be appreciated. 我在这里可能是错的-因此,如果有人可以提供帮助,将不胜感激。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM