Clearing back history in IE as a hosted control.

  • Thread starter Thread starter Ayende Rahien
  • Start date Start date
A

Ayende Rahien

I have an IE control that I host in my app, I usually Load() documents to
IE, but the user can navigate using links as well.
I want to clear the history (only the back & forward, actuall) when I Load()
a new document into IE, how can I do this?
 
HI,

I don't know how you can clear the history. but canceling
OnBeforeNavigate2() event (fired by WebBrowser Control), I think you can
prevent back & forward operation.
 
though and not a solution to the problem. If you want to prevent users from
navigating backward you should disable the cache on both the client and the
server thru the response object. WIth the cache disable, attempting to
navigate backward produces a page expired warning.

Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
 
Alvin Bruney said:
though and not a solution to the problem. If you want to prevent users from
navigating backward you should disable the cache on both the client and the
server thru the response object. WIth the cache disable, attempting to
navigate backward produces a page expired warning.

Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);

The problem is not with me as server, the problem is with me as *client*.
I want to reset IE's history when I move from one doc to another so the user
would've a context shift if he accidently click back.
 
Check for required functions in two places:

IUrlHistory - this group of interfaces controls reading writing and many
other functions with regard to history records.
find it in MSDN or Platfrom SDK after searching for IUrlHistoryStg (or
IUrlHistoryStg2) - it is hidden in content.

and

TravelLog - this group of interfaces controls access and managment of IE
travel history
ms-help://MS.PSDK.1033/inet/workshop/browser/travellog/travellog.htm

Both will give you app a full control over recording and reading history of
browsing. Actually I work on similar functionality right now and I am going
to implement these interfaces in my app. It does require some advanced
interop programming but one can cope with it.

Hope this helps.

Jacek
 
Back
Top