Why do large Web sites write CSS directly on the page?

Source: Internet
Author: User

In the view of Tencent, Sina, the layout of these large sites, found a problem, why they will put the CSS directly on the page, rather than separate as a CSS file link in.

This is a kind of optimization scheme to deal with super large flow.

To improve speed, their external connection files are generally stored on a separate server, such as img.****.com, if the server is hung up, the entire front page is hung off. On the page, more secure. When a user accesses a page, it does not result in a bare page because the CSS does not load.

Does this increase the cost of maintenance? If written on the page, it is not easy to modify and manage.

He could have been a separate CSS file. Include a php file in the header with include, and the PHP file is responsible for generating the CSS file.

You are actually maintaining a separate style sheet. Just put it together when it's up. Maintenance costs are not increased.

Using PHP to call CSS to the page, the server also has the cost?

Slow down, the homepage is cached as a static page.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.