Chrome – Getting around Same Origin Policy

Just a quick tid bit I nabbed from a great StackOverflow question. I was working on a simple ajax feature locally but wanted to hit a demo box to see what response I’d get, which browsers don’t typically like because you’re hitting a different host. Turns out you can tell Chrome to ease up on security by launching it with the –disable-web-security argument.

To do so on the Mac you just run “open -a Google\ Chrome –args –disable-web-security

And if you want to access local files via Ajax, you could also tack on -–allow-file-access-from-files