I have this AJAX code:

```
function ajax(){
    if (!navigator.standalone) return;
    for (var i= document.links.length; i-->0;) {
        document.links[i].onclick= function() {
            if(this.getAttribute("class") == "noeffect") return;
            var req= new XMLHttpRequest();
            req.onreadystatechange= function() {
                if (this.readyState!==4) return;
                document.body.innerHTML= this.responseText;
                ajax();
            };
            req.open('GET', this.href, true);
            req.send();
            return false;
        };}
    }

window.onload= function() {
    window.scrollTo(0, 0.9);
    ajax();

};

```

Now on my pages I have classes on my `<body>` on certain pages. Only those classes do not get returned of course. 
Is there a way to get the ENTIRE body using AJAX? or maybe the entire html (with the `<head>` content).

Thanks a lot for your help :)