diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/default-servlet.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/default-servlet.adoc index 766eb40e5c1..f91059a8e6c 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/default-servlet.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/default-servlet.adoc @@ -52,11 +52,9 @@ resources could be found. If `false`, then a welcome file must exist on disk. If servlet matches are supported without an existing file. Default is `true`. This must be `false` if you want directory listings, but have index.jsp in your welcome file list. precompressed:: -If set to a comma separated list of encoding types (that may be listed in a requests Accept-Encoding header) to file -extension mappings to look for and serve. For example: -`br=.br,gzip=.gz,bzip2=.bz`. -If set to a boolean `true`, then a default set of compressed formats -will be used, otherwise no precompressed formats supported. +If set to a comma separated list of encoding types (that may be listed in a requests Accept-Encoding header) to file extension mappings to look for and serve. +For example: `br=.br,gzip=.gz,bzip2=.bz`. +If set to a boolean `true`, then a default set of compressed formats will be used, otherwise no precompressed formats supported. gzip:: Deprecated. Use `precompressed` instead. If set to `true`, then static content is served as gzip content encoded if a matching resource is found ending with ".gz". resourceBase:: diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc index ff4c25256e4..7d962dae2aa 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc @@ -34,13 +34,13 @@ It fixes many of the bugs in commonly available compression filters: it works wi It has been tested with Jetty continuations and suspending requests. Some user-agents might be excluded from compression to avoid common browser bugs (yes, this means IE!). -The `GzipHandler` is added to the entire server by the `etc/jetty-gzip.xml` file from the `gzip.mod` module. +The `GzipHandler` can be added to the entire server by enabling the `gzip.mod` module. It may also be added to individual contexts in a context xml file. ____ [NOTE] Jetty 9 only compresses using GZip. -Using deflate http compression is not supported and will not function. +Using deflate HTTP compression is not supported and will not function. ____ [[gzip-filter-rules]] @@ -59,16 +59,25 @@ ____ Compressing the content can greatly improve the network bandwidth usage, but at the cost of memory and CPU cycles. The link:#default-servlet[DefaultServlet] is capable of serving pre-compressed static content, which saves memory and CPU. -By default, the `GzipHandler` will check to see if pre-compressed content exists, and pass the request through to be handled by the `DefaultServlet`. + +The `GzipHandler` installs an output interceptor which passes through to the `DefaultServlet`. +If the content served by `DefaultServlet` is already compressed, the `GzipHandler` does nothing; if it is not compressed, the content is compressed on-the-fly. + +____ +[NOTE] +Automatic precompression by the `DefaultServlet` can be configured. +Read more about the `DefaultServlet` link:#default-servlet[here.] +____ + [[gzip-filter-init]] ==== Gzip Configuration minGzipSize:: Content will only be compressed if content length is either unknown or greater than `minGzipSize`. -checkGzExists:: -True by default. -If set to false, the handler will not check for pre-compressed content. +checkGzExists (Deprecated):: +False by default. +If set to true, the handler will check for pre-compressed content. includedMethods:: List of HTTP methods to compress. If not set, only `GET` requests are compressed.