CSS loading in the page optimization _ website Application
Source: Internet
Author: User
1, CSS should be placed on the top of the structure (generally placed in the head element). CSS is an interpreted language, and Firefox and IE don't render anything until the CSS transfer is complete. The page can be rendered when the browser parses the structure only by placing the CSS in front of it.
This is causes the blank white screen problem. The page is totally blank until to the stylesheet at the bottom was downloaded, on the order of 6-10 seconds to this page. The browser is waiting for the stylesheet to being loaded before it renders else in the page, anything the static text.
The cause of the problem is that the page will be a period of "simple", Suddenly and "gorgeous", the user experience is very bad.
2, try to use <link rel= "stylesheet" href= "Http://www.planabc/yuanxin.css" type= "text/css" > Style import mode, and reduce the use of @import, Not to use multilayer nested @import. Because in IE, @import the equivalent of putting <link> on the tail of the page.
This is a valid syntax, but, even though it's in the document's head, it breaks progressive and rendering instead t He blank white screen and Flash of unstyled Content problems.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service