Plugins You can find out about all the publicly available Grails plugins.

Compress Plugin

  • Tags: performance, utility
  • Latest: 0.4
  • Last Updated: 21 December 2009
  • Grails version: 1.1.1 > *
  • Authors: null
0 vote
compile "org.grails.plugins:compress:0.4"




grails install-plugin compress


This plugin is not maintained and no longer works in newer versions of Grails. If you are a looking for a plugin to compress output there are other options such as resources, ui-performance etc.

Compress Plugin

Compresses output by having a servlet filter conditionally pipe whatever your web application produces to a GZIP-compressed file

This is the easiest way to compress your Grails app output with just a simple installation.

To install,

grails install-plugin compress


Once installed, this plugin will start gzip-compressing web textual output without any configuration. For configuration details please see "Configuration" section below.

To determine is the compression is working, use Firefox Addon's Web Developer Tool to view the document size. Right click, Web Developer -> Information -> View Documentation Size.


Configuration are based on the api docs here: Please see below for the configuration options specifiable in Config.groovy.

compress {
    // just in case for some reason you want to disable the filter
    enabled = true

debug = false statsEnabled = true compressionThreshold = 1024 // filter's url-patterns urlPatterns = ["/*"] // include and exclude are mutually exclusive includePathPatterns = [] excludePathPatterns = [".*\\.gif", ".*\\.ico", ".*\\.jpg", ".*\\.swf"] // include and exclude are mutually exclusive includeContentTypes = [] excludeContentTypes = ["image/png"] // include and exclude are mutually exclusive includeUserAgentPatterns = [] excludeUserAgentPatterns = [".*MSIE 4.*"] // probably don't want these, but their available if needed javaUtilLogger = "" jakartaCommonsLogger = ""

development { debug = true compressionThreshold = 2048 } production { statsEnabled = false } }


There is tag library that will output the various statistics that are provided by the package found here: Set statsEnabled to true to enable.


0.4 Updated to latest pjl-comp-filter 1.7 and make Grails 1.1.1 compliant

0.3 Updated to latest pjl-comp-filter 1.6.6 and added sensible defaults

0.2 Configurable now -- big thanks to Kevin Burke

0.1 First release