wai-extra-0.3.2.1: Provides some basic WAI handlers and middleware.Source codeContentsIndex
Network.Wai.Middleware.Gzip
Portabilityportable
StabilityUnstable
MaintainerMichael Snoyman <michael@snoyman.com>
Description
Automatic gzip compression of responses.
Synopsis
gzip :: Bool -> Middleware
Documentation
gzipSource
:: Boolshould we gzip files?
-> Middleware

Use gzip to compress the body of the response.

Analyzes the "Accept-Encoding" header from the client to determine if gzip is supported.

Possible future enhancements:

  • Only compress if the response is above a certain size.
  • I've read that IE can't support compression for Javascript files.
Produced by Haddock version 2.6.1