Search code examples
browserurl-interception

Intercepting URL before navigation


I would like to intercept any URL which the user enters in their browser and perform some tasks before allowing the navigation to continue (any way could be good - i.e. via plug in, via proxy or any other creative suggestion). To clarify - I am not referring to a specific application that needs to catch this, but rather - any navigation that the user does on his browser needs to be caught (i.e. the user is not opening my application, it should be running in the background or something like that...) Thanks in advance...


Solution

  • I do not think you can "intercept" what the user enters via javascript. It smells like a big security exploit. You can detect when the user leaves the page, but you cannot detect where he is going next.

    • A proxy is a good choice if you just need the URL string to be processed. But anything more complex will be complicated to implement in a proxy.

    • A plugin however, depends on which browser you are targetting, you can't make a single plugin that targets all browser and control user navigation at the same time. But if you get to selects which browser your user uses, then maybe.

    • How about rolling your own browser (using IE's ActiveX control) or using one of the open source alternatives and use that?

    What exact processing is it that you wish to do?