Reputation: 39
Same origin policy says that I can write to other origin, but I can't read from other origin. But what about jQuyery's .ajax, with crossDomain = true? I can now read other origin
Upvotes: 1
Views: 137
Reputation: 33163
jQuery, being a pure JavaScript library, is bound by the exact same limitations and security measures as JavaScript.
From the documentation:
crossDomain (default:
false for same-domain requests, true for cross-domain requests
)
Type: Boolean
If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain totrue
. This allows, for example, server-side redirection to another domain.
In other words it can only force a non-cross-domain request to be considered cross-domain, but not the other way around. It has no effect when the request is actually cross-domain.
Upvotes: 1