is it possible to load a ext page using JQuery from a different domain?
I tried using $.load to load an entire page form the nytimes.com, b开发者_如何学Goecause i was curious if there is an alternative method to embed entire pages not usinf iframes
my point is to understand how to build something like twitter or many app like Pulse for ipad and more...
is it possible to load pages with jQuery or php avoiding iframes?
thanks
With php, it's trivial - basically just echo get_file_contents('http://nytimes.com/');
. However, due to the same-origin policy, you can't access content loaded from other domains in JavaScript. If you control the server you're loading content from, you can however use Cross-Origin Resource Sharing or the JSONP trick to remove these restrictions.
Unfortunately due to Security issues this is not possible. There are alternatives tho.
Load website into DIV
Repeat Question.
精彩评论