Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

Confluence supports HTTP GZip transfer encoding. This means that if a user's web browser supports it, Confluence will compress the data it sends to the user. This will speed up Confluence over slow or congested Internet links, and reduce the amount of bandwidth consumed by a Confluence server.

(info) Gzipping the HTTP Response is available in Confluence 1.4 and later.

You should turn on Confluence's GZip encoding if:

  • Users are accessing Confluence over the Internet, or a WAN connection with limited bandwidth.
  • You wish to reduce the amount of data transfer between the Confluence server and client.

If you are accessing Confluence over a Local Area Network or over a particularly fast WAN, you may wish to leave GZip encoding disabled. If the network is fast enough that transferring data from Confluence to the user isn't a limiting factor, the additional CPU load caused by having to compress each HTTP response may in fact slow Confluence down.

 

(warning) The information on this page does not apply to Confluence OnDemand.

Known issues in Confluence 2.7 and earlier

Icon

There are known issues with the GZip filter and memory consumption evident in versions 2.7 of Confluence and earlier (CONF-9930). If you are running a large instance of Confluence 2.7 or earlier and frequently experiencing 'out of memory' errors, we recommend that you do not enable HTTP compression. These issues have been resolved in Confluence 2.8.

Enabling HTTP Compression

  1. Choose the cog icon  at top right of the screen, then choose Confluence Admin.
  2. Select 'General Configuration' in the left-hand panel.
  3. Enable 'Compress HTTP Responses'.

In Confluence 2.8 and later, you can configure which types of content are compressed within Confluence. By default, the following mime types will be compressed:

  • text/htmltext
  • javascript
  • text/css
  • text/plain
  • application/x-javascript
  • application/javascript

If you wish to change the types of content to be compressed, add a replacement urlrewrite-gzip-default.xml file within the WEB-INF/classes/com/atlassian/gzipfilter/ directory in your Confluence Installation Directory. A sample file is provided as an attachment. Generally speaking, it is unlikely that you will need to alter this file.

RELATED TOPICS

Performance Tuning
Confluence Administrator's Guide

1 Comment

  1. I noticed the following exception very frequently in our Confluence 4.1.6. Is this related to this feature? Please advise if i need to enable this feature in our confluence.

    2012-05-07 01:32:12,618 ERROR [http-80-10] [renderer.internal.http.HttpClientFetcher] fetch Unable to retrieve response
    -- url: /plugins/macrobrowser/browse-macros.action | userName: spatruni| referer: http://confluence.com/pages/editpage.action?pageId=31327059 | action: browse-macros
    java.io.IOException: Not in GZIP format
    at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:143)
    at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
    at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
    at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher$GzipDecompressingEntity.decorate(HttpClientFetcher.java:249)
    at com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher$InputStreamDecoratingHttpEntity.getContent(HttpClientFetcher.java:230)