Show TOC Start of Content Area

Procedure documentation Configuring Rules for HTTP Response Compression  Locate the document in its SAP Library structure

Use

AS Java is capable of applying the IANA (The Internet Assigned Numbers Authority) gzip message transfer encoding mechanism to HTTP responses. The purpose is to reduce the length of the response message body to be transmitted to the client, and in this way to achieve better communication performance.

Considering this, you can define rules that determine the behavior of the service when applying the gzip transfer encoding to both static HTTP responses and dynamic ones (that is, dynamic servlet or JSP responses).

Responses returned by Internet Communication Manager (ICM) from the ICM cache are returned with the same response compression (that is, gzipped or not) as the original response the server has generated. There is one exception, however:  ICM never returns gzip compressed responses to HTTP 1.0 clients.

More information: Configuring the Headers That Affect Dynamic Responses Compression

Procedure

Use SAP NetWeaver Administrator to define the gzip compression related settings:

...

       1.      To modify the properties of the HTTP Provider Service using SAP NetWeaver Administrator, use the Java System Properties function.

More information: Java System Properties.

       2.      On the Services tab, select HTTP Provider Service.

On the Extended Details tab page, a list of all service properties is displayed.

       3.      Edit the necessary properties according to the result that you want to achieve. You can:

       Specify the minimum required length of the response message to which gzip transfer encoding can be applied using the MinimumGZipLength property. The value of the property is specified in bytes. By default, it is 8192 bytes.

The system sends response messages that are shorter than the value of the MinimumGZipLength property unchanged. The reason for this is that for fast local area networks, data compression and decompression are slower than when the data is transmitted uncompressed. Therefore, you can use this property to utilize your network capacity and achieve the best communication performance.

       Define a comma-separated list of file extensions or MIME types that must always be compressed with gzip encoding as a value of the AlwaysCompressed property. However, response messages that appear in this list, and are shorter than the value of the MinimumGZipLength property, are not compressed.

Note

When you add a file extension to the list, it must start with an asterisk, such as *.html. All other strings are considered to be MIME types.

There is a special value for this property: this is the string [unknown]. It refers to dynamic response messages that do not have the Content-Type header set.

       Define a comma-separated list of file extensions or MIME types that must never be compressed with gzip encoding as a value of the NeverCompressed property.

Note

When you add a file extension to the list, it must start with an asterisk, such as *.html. All other strings are considered to be MIME types.

There is a special value for this property: this is the string [unknown]. It refers to dynamic response messages that do not have the Content-Type header set.

       Specify if the response messages that do not appear in the AlwaysCompressed and NeverCompressed lists are compressed using the CompressedOthers property. If you set it to true, the HTTP Provider Service compresses all other response messages that are longer than the value of the MinimumGZipLength property.

       Specify the request URL size above which the generated response for that request is not compressed (even if it should be according to the rules defined by the above properties) using the MaximumCompressedURLLength property. The URL size is specified in number of characters. Using this property, you can overcome known problems with caching compressed responses that are generated for long URLs on some browsers.

By default, the MaximumCompressedURLLength property has a value of -1, which means the request URL size does not affect the rules for compressing the response.

       4.      Choose Save Changes.

End of Content Area