I have a Windows app that embeds the IE WebBrowser control, and runs a local webserver to serve content it. The URLs I load in are only meaningful within the application, and not valid after the application exits. They're never visible to the user. They look like this:
http://127.0.0.1:1234/something.html
where 1234
is a random port number for that session.
But these URLs are appearing the IE browser's address bar history - when I type "1" into Internet Explorer's address bar, a dropdown appears with all my URLs in it. They are useless in that context.
So, my question is: how do I prevent my URLs polluting that dropdown?
A little more information: I'm loading the URLs using window.location.href = URL
, rather than via the Navigate
method, so navNoHistory
isn't an option (and I think that refers to the Back/Forward history anyway).
I've also tried deleting the URLs after the fact using IUrlHistoryStg::DeleteUrl()
, but it doesn't work (it returns success but has no effect) - any tips on making that work would be gratefully received.