[Javascript] capture & redirect URL

Tom Allison tallison at tacocat.net
Thu Jan 5 09:14:34 CST 2006


This might sound draconian but I have a question about redirecting URL
requests from a web page.

I know there are ways to capture href links and rewrite the addresses
using a variety of server/proxy side tools.  But I found that these
rewrites can't manage the URL's that are in javascript simply because
there aren't the regex matches available.

Ultimately I would like to find out if there is a way to intercept all
requests and redirect/munge the URL's.

I was working with a Proxy yesterday and found that even when the HTTP
proxy is defined in the browsers configuration (and I could find lots of
pages being passed through the proxy) I found that I was getting cookies
put onto my browser that were not from traffic through the proxy.  This
leads me to the suspicion that you can make javascript based calls (most
of the calls appeared to be from javascript code) which can ignore the
proxy settings of the browser.
True/False?

Is there any conceivable way to intercept these and put them back on
track to the proxy?

I am guessing a lot of this falls into object properties of IFRAMES and
WINDOWS, but I'm still struggling to find any good information on the
internet on how to use these.  So many sites just want to sell you crap.

Thank you.



More information about the Javascript mailing list