Enabling Cross-Domain AJAX in Firefox

So I just learned how to do this… what a time saver this will be for AJAX development. Be warned that this allows cross-domain XHR’s to and from any site! This is a major security risk.

1. Close Firefox

2. Edit the file prefs.js in your Firefox user profile folder

3. Add the following line anywhere in the file

user_pref(“capability.policy.default.XMLHttpRequest.open”, “allAccess”);

4. Save the file and re-open Firefox. You can now risk your life and limb by doing XHR’s to whatever domains you want – congratulations!

Read previous post:
jquery get() method

Since I learned about jQuery I've wondered why it didn't give you access to the original DOM elements that it...

Close