Browser / Tab History

Add-in Express™ Support Service
That's what is more important than anything else

Browser / Tab History
 
Harald Holzmann




Posts: 37
Joined: 2017-08-08
Hello,

I need to have the browser history per tab. So i want a list like that:
Tab 1: www.google.at -> www.windows.at -> www.glert.at
Tab 2: XXX -> XXX -> XXX
Tab 3: .....

And so on: If the Users manuelly refreshes (Enter, F5,..) i want to clear the list of the tab (so basicaly only references/hrefs) should count. What is the best way to achive this? Is there in WindowStateChange oder DocumentComplete a way to get the id of the tab?

Thanks for your help!

Kind regards,
Harald
Posted 08 Aug, 2017 08:58:03 Top
Harald Holzmann




Posts: 37
Joined: 2017-08-08
Short update:

I found a possible solution (right now i am not sure if it's 100% save). In DocumentComplete event i get the url to store and the this.HTMLDocument.referrer the referrer (empty if enter or refresh or so on). IE starts a new instance of the toolbar for every tab. So i just save the history in an class variable as ArrayList. So i have the history of every tab :)

Is that correct and a possible solution?


One more question: The DocumentComplete is always called twice, any idea about this?

Thanks and kind regards,
Harald
Posted 08 Aug, 2017 09:33:58 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Harald,

Yes, this is the correct solution. You can read more info about the 'referer' property here: https://msdn.microsoft.com/en-us/library/aa752603(v=vs.85).aspx

Please try to use the DocumentComplete2 event of iemoddule instead of DocumentComplete.
E.g.

private void IEModule_DocumentComplete2(object pDisp, string url, bool rootDocLoaded)
{
    if (rootDocLoaded)
    {
        // run your code here
    }
}
Posted 09 Aug, 2017 14:38:39 Top