By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,214 Members | 1,473 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,214 IT Pros & Developers. It's quick & easy.

WebBrowser - how to clear session cache?

P: n/a
How can I clear the current session cache of previously visited webpages?

That is, say I start up my app (with browser component), point to
www.cnn.com, click on several links, then I want to programmatically clear
the current session cache so if the user hits the back button, their current
page is now, in reality, the start node and there is nothing to traverse to.
Mar 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you want to disable back events for your own application, that's not
possible however you can choose to not cache the pages using the pragma no
cache directive. hope this helps.

--
Warm Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley 2006
Blog: http://msmvps.com/blogs/Alvin/
-------------------------------------------------------

"ESmith" <el**********@hotmail.com> wrote in message
news:eS*************@TK2MSFTNGP09.phx.gbl...
How can I clear the current session cache of previously visited webpages?

That is, say I start up my app (with browser component), point to
www.cnn.com, click on several links, then I want to programmatically clear
the current session cache so if the user hits the back button, their current page is now, in reality, the start node and there is nothing to traverse to.

Mar 30 '06 #2

P: n/a
If Ive understood correctly and you want to stop people going 'back', somewhere on your page you could use the javascript:

history.forward();

no more going back as you are already there.

This does of course need something on your page to put the JS there - you could have a common user control or alternatively in the Render event of a page that wraps what you are viewing you can intercept the construction of the html with a HtmlTextWriter...very useful when you need to retrospectively add common page attributes such as the ie title bar months into development.
Apr 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.