Can the whole HTML page, including the header, be updated without reloading the page?

I know that Ajax can make a request to the server, change some tag or part of the page. I know that you can simply change the java script through InnerHTML.

And maybe something like this Window.InnerHTML or document.InnerHTML? Just remember that the header / header should change too.

  • @javascript; If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

1 answer 1

It is possible so:

document.getElementsByTagName('head')[0].innerHTML = '<meta content="Вася Пупкин" name="author"><style>h1{font-weight:normal;}</style>';