Home > Web Front-end > HTML Tutorial > Page loading order problem_html/css_WEB-ITnose

Page loading order problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:19:20
Original
1493 people have browsed it

I don’t know if children’s shoes have encountered this situation: when the Internet speed is relatively slow, all the text on the web page is gathered in the middle of the screen. It will be displayed normally after loading into css. Please support


Reply to the discussion (solution)

Have you encountered this before? Due to the slow network speed, the relevant CSS could not be downloaded, so the page was rendered with basic HTML flow

What does the original poster mean by "asking for support"?
Do you want others to solve this problem or do you support your point of view?

I have indeed encountered such a situation, so I put the CSS introduction at the top of the page and compressed it as much as possible.

Optimize, compress your css file, below 10K, 2-3K after compression is more acceptable.

Is there any good solution for this situation?

I have indeed encountered such a situation, so I put the CSS introduction at the top of the page and compressed it as much as possible. It is placed at the top of the page. It can be referenced by CSS (several files) and is not large in size.

What does the original poster mean by "asking for support"?
Do you want others to solve this problem or do you support your point of view? There must be a solution.

Compression and other things are all mentioned above. Another point, don't use methods like @import to load multiple files. When using the link method to load css, the browser can download it in parallel, which is much faster.

Merge css files and optimize them. In this way, you only need to initiate a request and it will be done. Multiple requests will definitely be slow.

Quoting the reply from shn11160 on the 2nd floor: What does the poster’s “asking for support” mean?
Do you want others to solve this problem or do you support your point of view? There must be a solution
If the maintenance is not very complicated, embed the styles in these CSS files into the style tag in the head tag
in HTML, for example:

<!DOCTYPE html><html>   <head>      <meta charset=“utf-8"/>      <title>index</title>      <style type="text/css">      /*------------把CSS写在这里----------------*/      </style>   </head>    <body>      <!-- HTML -->   </body></html>
Copy after login

The problem of network delay

The problem of network delay
I also know that it is the problem of network delay. The problem is that I need to avoid this situation in the case of network delay

I’ll end the post tomorrow, thank you all for your answers, I’ll get off work first

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template