Firefox and Internet Explorer both have settings where a user may enable forbidden cross-domain calls.
Is there a similar setting or option in Safari and/or Chrome?
For a successful cross-domain communication, we need to use dataType “jsonp” in jquery ajax call. JSONP or “JSON with padding” is a complement to the base JSON data format which provides a method to request data from a server in a different domain, something prohibited by typical web browsers.
Cross-origin resource sharing (or CORS) can be used to make AJAX requests to another domain.
CORS is a mechanism that defines a procedure in which the browser and the web server interact to determine whether to allow a web page to access a resource from different origin. Figure 2. Cross domain ajax request. When you do a cross-origin request, the browser sends Origin header with the current domain value.
For instance, if sending a request from http://www.example.com, any of the following would be "cross origin": http://mail.example.com (domain differs) https://www.example.com (protocol differs) http://www.example.com:8080 (port differs)
Not sure about safari, but Chrome has a command line switch for this:
chrome.exe --disable-web-security
You can view a full list (as of when it was posted!) of command line options for chrome here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With