Start with body hidden and show it after your code is executed.
<html>
...
<body style="display:none">
...
<script>
$(document).ready( function() {
...
$(document.body).show();
})
</script>
</body>
</html>
solved How to run some code before page is displayed [closed]