If I use the $.get() method with JavaScript to grab an external file, if the url that I pass to the $.get() method is a php forwarder to the actual URL page, how can I get the URL of that second page?
...
$.get("http://www.example.com/forwarder.php",
function(response) {
...
So, how can I get the URL of the document that response relates to?
If the PHP page that is being requested sends a redirect header, then likely there is nothing you can do with jQuery to accomplish this. The browser’s internal mechanics handle redirects, and jQuery would be none the wiser.
You could always have the resultant page include its URI in the response, if it is in XML or JSON format.