for a secure web application , How to clear an item in server Cache on Browser close.
-
@Roman:small correction to the question i posted.I need to remove a particular cache item from server.using javascript may be useful.Vikas Kunte– Vikas Kunte2011-10-13 12:39:19 +00:00Commented Oct 13, 2011 at 12:39
-
@Vikas - you could save some identifier in your session object and when it has timed out - you could know what piece of data you should remove. I can't how javascript may be helpful - because when you close your browser - the javascript won't work.Roman– Roman2011-10-13 13:14:26 +00:00Commented Oct 13, 2011 at 13:14
Add a comment
|
1 Answer
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.
More info about the session object you can find here - 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!