[APACHE DOCUMENTATION]

Apache HTTP Server Version 2.0

Module mod_deflate

This module provides the ability to compress content before it is delivered to the client.

Status: Experimental
Source File: mod_deflate.c
Module Identifier: deflate_module
Compatibility: Available in Apache 2.0 and later.

Summary

The experimental mod_deflate module allows output from your server to be compressed before being sent to the client over the network.

Directives

See also: AddOutputFilter and SetOutputFilter

Enabling Compression

Compression is implemented by the DEFLATE filter. The following directive will enable compression for documents in the container where it is placed:

Most popular browsers can not handle compression of all content so you may want to enable the 'gzip-only-text/html' note (see below)

SetEnv gzip-only-text/html 1
SetOutputFilter DEFLATE

Here is an example of enabling compression for the Apache documentation:

<Directory "/your-server-root/manual">
SetEnv gzip-only-text/html 1
SetOutputFilter DEFLATE

leave the existing directives as-is
</Directory>

DeflateFilterNote directive

Syntax: DeflateFilterNote notename
Default: none
Context: server config
Override: none
Status: Experimental
Module: mod_deflate
Compatibility: Apache 2.0 and above

The DeflateFilterNote directive specifies that a note about compression ratios should be attached to the request. The name of the note is the value specified for the directive.


DeflateWindowSize directive

Syntax: DeflateWindowSize value
Default: none
Context: server config
Override: none
Status: Experimental
Module: mod_deflate
Compatibility: Apache 2.0 and above

The DeflateWindowSize directive specifies the zlib compression window size.


DeflateMemLevel directive

Syntax: DeflateMemLevel value
Default: none
Context: server config
Override: none
Status: Experimental
Module: mod_deflate
Compatibility: Apache 2.0 and above

The DeflateMemLevel directive specifies the amount of memory available to zlib for compression.


Apache HTTP Server Version 2.0

Index Home