How is HTML compressed

Compress HTML code

Due to the fact that a not inconsiderable part of the data volume required to display a website is accounted for by the HTML code, the compression of the content is often advantageous. Ultimately, the transmission of large amounts of data over the Internet slows down a website and makes the visitor wait unnecessarily long.

In order not to expect too long waiting times for visitors to a website when accessing a website, the amount of data required to display a page should be as small as possible. Since the content on Internet pages makes up by far the largest part of the amount of data to be transferred - at least it should be - this is where the greatest potential for savings lies.

After all, long loading times have a negative effect on the usability of a homepage, which in extreme cases can lead to the site visitor losing patience and prematurely interrupting the loading process. A visitor who is disgruntled in this way - especially if the domain used has a memorable name - memorises such a faux pas faster than a positive experience.

Without ever having seen the Internet offer, he will probably no longer click on the offer at the next opportunity - for example if the domain appears prominently in the search results of a search engine in a later listing, because he does not expect anything different than the last (attempted ) Page view. If the page is about a topic that is not up-to-date at regular intervals, the page visitor is lost once and for all.

Since the first request to the web server of the site operator is usually the retrieval of an HTML file, this must be delivered to the browser as quickly as possible. The references to external files contained in the HTML document - for example stylesheets and JavaScript files - which are necessary for correct and complete page display, are subsequently reloaded by means of further HTTP requests. If the HTML page is delivered quickly and there is a problem with reloading external page elements, the website visitor can at least see that the page is being delivered - even if this loading state is in need of improvement, the web server gives at least a sign of life.

However, if the loading of the HTML file takes too long, this state is untenable, since the visitor is effectively denied access to the website. Now, there are numerous factors that have a negative impact on website performance. In addition to the suggestions for improvement addressed under Optimizing images, filtering comments and minimizing the code structure, HTML pages that have turned out to be too large should be compressed using GZIP - or, if possible, the information should be distributed over different pages.

By the way, you shouldn't waste too much time removing superfluous spaces from the HTML sources or templates. Although the reduction in size of the HTML file achieved in this way has a very clear effect on the uncompressed file, after a subsequent GZIP compression, this preprocessing is hardly noticeable.

Page 1 of 2 | «[1] • [2]»