Skip to main content

Content encoding

The speed at which a web page loads plays an important role in the user experience. Content encoding

can significantly reduce the transfer time.

What does Content Encoding mean?

Content

encoding is used to compress large HTML documents before they are sent to the user. For example, if a document is sent over a slow Internet connection, the transmission time can be reduced by compressing the content. Encoding can also be used to prevent the content from being viewed by unauthorized third parties.

Content encoding process

First, the web server generates a response to a request for a web page with the original headers for content type and content length. Then, content encoding is performed either by the origin server itself or by a downstream proxy server. The encoded message has the same content type but, for example, if the content has been compressed, a different content length. The encoding server adds another header to the encoded response, the Content-Encoding-Entity header

. The header indicates what encodings have been applied to the entity body so that the content can be decoded again by the receiver. After encoding, the response is sent to the receiver. The receiving program decodes the content and displays it.

Also of importance to you may be Accept Encoding Header. Here you can learn more:

To the article

Do you have any more questions?

Please contact us


Further contents