Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery .load Same origin policy

Is there anyway i can fool the Jquery .load Same origin policy? The closest i've come is with this tutorial.

But that only deals with rss feeds.

like image 250
Bub Avatar asked Mar 16 '10 11:03

Bub


People also ask

Which two URLs have same origin?

Two URLs have the same origin if the protocol, port (if specified), and host are the same for both. You may see this referenced as the "scheme/host/port tuple", or just "tuple".

Is same-origin policy default?

Hence the name same-origin policy. The same-origin policy is active by default and most browsers provide good error messages when actions cannot be executed because of same-origin policy issues. For instance, the following script defines an illegal cross-origin HTTP request.

What is same-origin policy how you can avoid same-origin policy?

The same-origin policy generally controls the access that JavaScript code has to content that is loaded cross-domain. Cross-origin loading of page resources is generally permitted. For example, the SOP allows embedding of images via the <img> tag, media via the <video> tag and JavaScript includes with the <script> tag.

How do you fix the same-origin policy disallows reading the remote resource?

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.oxfordlearnersdictionaries.com/search/english/direct/?q=by+far. This can be fixed by moving the resource to the same domain or enabling CORS.


1 Answers

The same origin policy is a browser thing, not a jQuery thing.

JSON-P is the usual way to work around this and is not limited to RSS feeds. It is even documented in the jQuery documentation (see the example that uses Flickr)

like image 101
Quentin Avatar answered Oct 04 '22 14:10

Quentin