Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the reasons for not compressing HTML?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the reasons for not compressing HTML, the article is very detailed, has a certain reference value, interested friends must read it!

The reason is simple:

In HTML documents, multiple white space characters are equivalent to one white space character. In other words, it is not safe to delete white space characters such as line breaks, which may lead to differences in the style of some elements.

In the HTML element, there is a pre that represents preformatted text. Any blank space in it cannot be deleted.

There may be IE conditional comments in HTML. These conditional comments are part of the document logic and cannot be deleted.

Only think of the above three points, there may be other traps. For dynamic pages, HTML compression may also increase the server's CPU burden, the loss outweighs the gain.

Generally speaking, good results can be achieved through gzip compression. Further compression is trapped, and compression of HTML is not recommended unless it can be fully tested like Google (Google also compresses only a small number of core service pages).

These are all the contents of this article entitled "what are the reasons for not compressing HTML?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report