Nate Nate - 9 months ago 42
Ajax Question

Sending the body of a page to another server?

Is it possible to send the body of a page (i.e. all of the HTML code/DOM) from a page on one server to another and then receive a response? The method used doesn't really matter, but I do have access to jQuery functions if that helps.


You could do this by sending...

$("html").html(); an ajax call:

var data = $("html").html();
    url: "/echo/json/",
    data: data,
    type: "POST"
}).done(function(res) {

Working jsFiddle:

(See console for body output).