Greetings

I made the loader while the site page loads, as soon as all the data is transferred to the client, the page is formed, etc. loader hiding.

There is one problem - there are many libraries loaded on the page ( <script ... > ), and, as I understand it, until everything that is before <body> is loaded, nothing will be output to <body> , including my bootloader.

As a result, it turns out that part of the time (noticeable) at the beginning of the browser screen is just white and only then the downloader appears.

The question is how to fix it?

One solution is probably to create all the stuffing dynamically using javascript, then the body of the page will be formed immediately, then javascript code will be executed.

  • async and defer option? - user33274
  • <script src = "js.js"> </ script> </ body> insert script_s before closing / body - Dhunga
  • @ Maxim Lensky, did not understand - Zhihar
  • Read here - hindmost

0