Home > Configuration > Compression > addcmpaction

addcmpaction

Use this method to creates a compression action.
Note: User-defined compression actions supplement the built-in compression actions. The built-in compression actions, NOCOMPRESS, COMPRESS, GZIP, and DEFLATE, are always available.
Available settings functions as follows:
* NOCOMPRESS - Disables compression for data that matches the associated policy.
* COMPRESS - Enable GZIP or DEFLATE compression, depending on which is supported by the browser.
* GZIP - Enable GZIP compression. For browsers that do not support GZIP, compression is disabled.
* DEFLATE - Enable DEFLATE compression for a specific policy. For browsers that do not support DEFLATE, compression is disabled.

Syntax



Parameters

name

Name of the compression action. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Can be changed after the action is added. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my cmp action" or 'my cmp action').
This is mandatory parameter.

cmptype

Type of compression performed by this action. Available settings function as follows: * COMPRESS - Apply GZIP or DEFLATE compression to the response, depending on the request header. Prefer GZIP. * GZIP - Apply GZIP compression. * DEFLATE - Apply DEFLATE compression. * NOCOMPRESS - Do not compress the response if the request matches a policy that uses this action.
This is mandatory parameter.

addvaryheader

Control insertion of the Vary header in HTTP responses compressed by Citrix ADC. Intermediate caches store different versions of the response for different values of the headers present in the Vary response header.
Default value = CMP_VARY_HDR_GLOBAL.

varyheadervalue

The value of the HTTP Vary header for compressed responses.

Return Value

Returns simpleResult

See Also