So, on the net, I came across several ways to preload / redirect a web page.
Now the question is the correct way to handle pre-loading redirects (load the next async page while showing the current page)
$.get("page.php", function (data) { document.open(); document.write(data); document.close(); window.history.pushState("Title", "Title", "/page.php"); $.cache = {}; }, "html");
Or should I stay with a regular redirect?
window.location = "page.php";
The next page contains a full-screen video and soundtrack (audio)
Thanks.
source share