Usage of gzip response compression can optimize the response time and improve interaction with an application as it reduces the traffic between the Web server and browsers. Enabling compression configures the server to return zipped content for the specified MIME type and size of the response.
You have downloaded and configured SAP BTP console client.
For more information, see Set Up the Console Client.
SAP Business Technology Platform, Neo environment will sunset on December 31, 2028, subject to terms of customer or partner contracts.
For more information, see SAP Note 3351844.
This documentation refers to SAP Business Technology Platform, Neo environment. If you are looking for documentation about other environments, see SAP Business Technology Platform
↗️ .
You can enable and configure gzip using some optional parameters of the deploy command in the console client. When deploying the application, specify the following parameters:
-
To enable gzip compression, specify --compression on.
-
To configure response MIME types that will be compressed, use --compressible-mime-type.
-
To specify the size of responses which will be compressed, use --compression-min-size.
If you enable compression but do not specify values for --compressible-mime-type or --compression-min-size, then the defaults are used: text/html, text/xml, text/plain and 2048 bytes, respectively.
If you specify values for --compressible-mime-type or --compression-min-size but do not enable compression, then the operation passes, compression is not enabled and you get a warning message.
If you want to enable compression for all responses independently from MIME type and size, use only --compression force.
neo deploy myapp.properties --compression on --compressible-mime-type application/javascript,application/json
--compression-min-size 1024
Once enabled, you can disable the compression by redeploying the application without the compression options or with parameter --compression off.
Related Information