Current URL

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

Current URL
 
Harald Holzmann




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

what is the best option to get the current url and which event to use? With current url I mean what is the current value of the adress bar. I already tried onDocumentComplete and onBeforeNavigate but these events sometimes thrown with Ressources (like javascript) or something like that. I need a very relyable function to get the current url of the current loaded website. And also need to get notified about changes.

Thanks,
harald
Posted 12 Oct, 2017 09:07:08 Top
Sergey Grischenko


Add-in Express team


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

You can use IEApp.LocationURL to get the current Url.
Posted 13 Oct, 2017 07:23:37 Top
Harald Holzmann




Posts: 39
Joined: 2017-08-08
Hey Sergey,

thanks great, exactly what i wanted.

Another question: Is it also possible to the the origin from that url?

The requirement: I need to track every website the user visites. And if the users reloads or manually enters a domain and presses enter (so origin is empty) i need to clean the history. Which event do i need? Or any idea how to achive this?

Thanks,
Harald
Posted 18 Oct, 2017 06:21:56 Top
Sergey Grischenko


Add-in Express team


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

As far as I remember, you used the 'referer' property of HTML document. Doesn't this property suit you in this case?
Please look at the HttpMonitor example: https://www.add-in-express.com/support/ie-vbnet-csharp.php
It should help you.
Posted 19 Oct, 2017 04:26:37 Top