Access Control Request Headers, is added to header in AJAX request with jQuery

What you saw in Firefox was not the actual request; note that the HTTP method is OPTIONS, not POST. It was actually the ‘pre-flight’ request that the browser makes to determine whether a cross-domain AJAX request should be allowed: http://www.w3.org/TR/cors/ The Access-Control-Request-Headers header in the pre-flight request includes the list of headers in the actual … Read more

Disable same origin policy in Chrome

Close chrome (or chromium) and restart with the –disable-web-security argument. I just tested this and verified that I can access the contents of an iframe with src=”http://google.com” embedded in a page served from “localhost” (tested under chromium 5 / ubuntu). For me the exact command was: Note : Kill all chrome instances before running command The browser … Read more

TypeError: $.ajax(…) is not a function?

Neither of the answers here helped me. The problem was: I was using the slim build of jQuery, which had some things removed, ajax being one of them. The solution: Just download the regular (compressed or not) version of jQuery here and include it in your project.