Blocking / Purging IE History in WebBrowser host app RRS feed

  • Question

  • Hi

    A project that i'm working on hosts a browser control and needs to prevent it from writing history entries. I cannot find a solution maybe someone here can lend a hand...

    Clearing the entire history is too invasive; i only want to prevent local files that are loaded within my app from being appended to the global history (the control's history is not important, my app has no back buttons). Also it must not interfere with other instances of IE that may be running at the time.

    Ideally i'd be able to select which URL paths are committed. Is there an event that can be handled for doing this or a com interface that i should be looking at?

    I've looked into selectively purging the history but as this cannot be done while explorer is running seems to be a dead-end.

    While searching for information i've found examples of applications that achieve this with IE but how is still a complete mystery!

    Many Thanks

    Sunday, December 17, 2006 10:55 PM


All replies

  • This is not possible because the url is added to the history by the COM component. There is however one way to delete it:

    But from what I have read this doesn't work:

    If you don't want it to appear in the history dropdown list you can manipulate the registry entries in the following key:

    • HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs

    I don't know however whether are not there are API calls to delete entries from this key. Also when users start typing the urls will still be included in the autocomplete list.

    Sunday, December 17, 2006 11:27 PM
  • Hi thank you

    Yes i know these apis, unfortunately i didnt realise that they only partially work when i started out with the ie control!

    It must be possible though because i have found a thing called stealthbrowser pro that does it. I am wondering though if this just uses MSHTML - assuming SHDOCVW handles the history stuff.

    Ah have just looked at stealthbrowser with process explorer... it's using:
    but no shdocvw.dll!

    Hmmm... maybe im better off starting again with gecko :(

    Monday, December 18, 2006 12:09 AM