Several reasons for not compressing HTML

Several reasons for not compressing HTML
The reason is simple:

In HTML documents, multiple whitespace characters are equivalent to one whitespace character. In other words, it is unsafe to delete whitespace characters such as line breaks, as this may cause differences in the styles of some elements.
In HTML elements, there is a pre, which means preformatted text. Any whitespace inside it cannot be deleted.
It is possible to have IE conditional comments in HTML. These conditional comments are part of the document logic and cannot be removed.
I only think of the above 3 points, there may be other pitfalls. For dynamic pages, HTML compression may increase the CPU burden on the server, which is not worth the cost.

Generally speaking, gzip compression can achieve good results. There are pitfalls to further compression, and unless you have tested it as thoroughly as Google has (Google only compresses a small number of core service pages), it is not recommended to compress HTML.

<<:  Detailed explanation of JavaScript timers

>>:  Solutions to invalid is Null segment judgment and IFNULL() failure in MySql

Recommend

Shtml Concise Tutorial

Shtml and asp are similar. In files named shtml, s...

Install and configure MySQL under Linux

System: Ubuntu 16.04LTS 1\Download mysql-5.7.18-l...

How to use jconsole to monitor remote Tomcat services

What is JConsole JConsole was introduced in Java ...

Detailed explanation of setting up DNS server in Linux

1. DNS server concept Communication on the Intern...

Vue axios interceptor commonly used repeated request cancellation

introduction The previous article introduced the ...

How to solve jQuery conflict problem

In front-end development, $ is a function in jQue...

CSS perfectly solves the problem of front-end image deformation

I saw an article in Toutiao IT School that CSS pe...

Detailed explanation of lazy loading and preloading of webpack

Table of contents Normal loading Lazy Loading Pre...

...

Tutorial on installing Odoo14 from source code on Ubuntu 18.04

Table of contents Background of this series Overv...

6 solutions to IDEA's inability to connect to the MySQL database

This article mainly introduces 6 solutions to the...