The above does not work as Ajax requests cannot access files / pages in other domains due to security issues. Typically, you can make a script using [Insert Server Side Language here] to load the requested page. Then your javascript can make a request to this page.
There is also "JSONP", but this is commonly used on sites that provide some JSONP access, which most random URLs don't.
source share