From the virtual server page, click the Content Handling tab.
Click General sub tab. Go to Compress Content on Demand section under Compression section.
Select from the following options:
On—Demand Compression — Enable/Disable on-demand compression for the selected resource.
Insert Vary Header — Specify whether to insert a Vary: Accept-encoding header.
If selected, then a Vary: Accept-encoding header is always inserted when a compressed version of a file is selected.
If not selected, then a Vary: Accept-encoding header is never inserted.
Fragment Size — Specifies the memory fragment size in bytes to be used by the compression library (zlib) to control how much to compress at a time. The default value is 8096.
Compression Level — Specifies the level of compression. Choose a value between 1 and 9. The value 1 yields the best speed; the value 9 the best compression. The default value is 6, a compromise between speed and compression.
Click Save.
Using CLI
For enabling compression on demand through CLI, execute the following command.
wadm> enable-on-demand-compression --user=admin --password-file=admin.pwd --host=serverhost --port=8989 --config=config1 --vs=config1_vs_1 --insertvaryheader=true --fragment-size=100 --compression-level=5 |
See CLI Reference, enable-on-demand-compression(1).