Question

I'm working on a AJAX application that pull data from a live website, I can't replicate the complete application on my local environment at the moment so in order to test if the Javascript code is working as expected I need to be able to bypass the same domain restriction on the browser (without making changes on the web server) any suggestion will be greatly appreciated.

So far I have tried modifying the prefs.js in Firefox 2 and Camino including the lines suggested in this link: http://www.zachleat.com/web/2007/08/30/cross-domain-xhr-with-firefox/

Thanks in advance.

Edit 04/29/2009 3:18pm:

I agree the proxy option is definitely a way to go. But would it be possible to have a solution using just Firefox? (maybe an add-on?)

Was it helpful?

Solution

If you can change the endpoint URL you could bounce the requests through your local server, either with mod_rewrite or a simple script.

This has the advantage that you can easily log the requests and responses, and alter them (e.g. send back timeout errors, bad data and the like).

OTHER TIPS

Well, for viewing the requests/stepping through the js try using Firebug.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top