简体   繁体   中英

Render HTML page before Head loads

I have a <head> tag with a lot of scripts, converted a website from 7 pages into 1 and so now the 1 page is doing the work of 7. There is about a 2 - 30 second load time and I am in no way going to make this optimized for mobile.

Writing raw html doesn't seem to show until the page is fully loaded, so writing 'Loading, please wait...' doesn't appear until after the fact.

How does one display a loading comment before the head tag finishes loading?

Off the bat you have three simple options. You could move scripts out of the head, or you could defer the scripts , or you could async the scripts .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM