+1  A: 

If you have control over the website, you could have it write a cookie to the computer. Then have your application monitor for that cookie.

Brad
There is no cross-browser way to monitor for a cookie.
SLaks
Surely there are ways to watch multiple folders. Your application would have to be setup to monitor IE, FF, Safari, Chrome, etc cookie folders.
Brad
Thanks Brad, but I hope to find a better way. Also, tomorrow I might want to "watch" for site I don't control like ebay.com. So I'd rather find a way, where I get notified to which url user is navigated.
Jack Juiceson
A **lot** of sites use cookies, so you may not need to "control" them to ensure that a cookie is left behind. Then again, they could always change their policy. Let us know if you come up with an answer.
Brad
A: 

You can implement this in many ways and at many different layers.

At the highest level, you could implement a browser plugin. There is no cross-browser solution at this layer that will let you write the code once and work for every browser. On the easy end of the spectrum, Firefox, you could implement it entirely as a Javascript + XUL plugin and use built-in XPCom interfaces (nsIProcess) for launching your helper process. For IE you would need to write a COM, C++ and win32 BHO that handles DWebBrowserEvents2::BeforeNavigate2. This is the hardest thing to do. There are mechanisms for Safari, Chrome and other webbrowsers that you could use to achieve this same behavior, with varying degrees of difficulty.

At the next level you could implement an HTTP proxy, similar to Fiddler2, that redirects all HTTP traffic through your local proxy first. Each browser has a different way of configuring its proxy settings, but they're all basically registry settings or config files.

At the most basic level you could just snif all IP traffic going out of the machine, similar to the way Wireshark does it, and just look for http requests to your URL. This is probably more difficult to code, but would work for all browsers without any special per-browser configuration stuff going on. You may need to write a driver. I dunno, I've never done work at this level in the stack.

jeffamaphone