Finding the URL of an XMLHttpRequest

Posted by hawkettc on Stack Overflow See other posts from Stack Overflow or by hawkettc
Published on 2010-06-17T22:24:24Z Indexed on 2010/06/17 22:43 UTC
Read the original article Hit count: 237

Filed under:
|

Hi,

I've got some code that does an ajax request using jQuery, and handles success and error conditions. On an error, I want to find out what the URL I called was, so I can log it. This information appears to be contained in the XMLHttpRequest.channel, but firefox is complaining about accessing this -

Permission denied for <http://localhost:8081> to get property XMLHttpRequest.channel

Any ideas how I can determine the URL associated with an XMLHttpRequest? What's the security issue getting hold of this information? Cheers,

Colin

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery