When you go to the site loading the page, when everything is loaded the rest of the page is loaded via ajax

xml.onload = function(){ if(xml.readyState===4&&xml.status===200){ $('article').html(xml.responseText); } } 

If you look after it into the source code (click on the “Source code of the page”, and not the “Source code of the element”), then there is only the part that was loaded via ajax. And because of this, there are problems, for example, if you switch from this site to any other, and then press the button back, you can only see the piece of the page that was loaded via ajax. How to fix it?

Closed due to the fact that it was off topic by PashaPash member ♦ Jun 13 '17 at 12:04 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - PashaPash
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 3
    Here you give - implement the ajax request with your hands when there is $ .ajax () in jquery .... all have the same problems - distinguish on the server side ajax and not ajax download, if ajax, then return only a part, and not ajax, then return all the headers and footers. - zb '
  • sorry, but I did not understand anything - TANKIST
  • 2
    Firstly: Uncaught ReferenceError: setting is not defined ajax.js: 131 xml.onload secondly, try to make the url in the ajax request not match the url of the page, chrome is somehow strangely buggy about this. - zb '
  • 3
    They say a bug in chrome is strange that a year ago it has not been fixed ... - zb '
  • Strangely, I do not have that error that you have and it is not only in chrome, but also in other browsers (at the expense of the source code, and not the back button). And thanks for the link! - TANKIST

0