In general, the task was to block all content on the page until it loads. Made a full page div, which after loading is assigned display: none;
<script> window.onload = function() { document.getElementById('blocker').style.display = "none"; }; </script>
But the following problem arose, when I go to the next page using ajax and come back, this script is not executed and the content remains blocked. How to make this script run? Or maybe you can do something differently?