Enable compression for JS, CSS, JSON and XML responses

Description

Some static .js and .css files in particular and dynamic JSON and XML responses can be quite large, and would benefit from being compressed to reduce load times and bandwidth usage.

There are several possible approaches:

1. Frontend httpd servers like Apache httpd can compress on-the-fly with mod_deflate for specific content-types:

http://httpd.apache.org/docs/current/mod/mod_deflate.html

Sample configuration in httpd.conf:

1 2 # mod_deflate (compress output for browsers that support it) AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript text/x-js application/json application/xml application/javascript

2. We could set a gzip compression filter in jetty:

http://www.eclipse.org/jetty/documentation/current/gzip-filter.html

Steps to reproduce

None

Status

Assignee

Unassigned

Reporter

Stephen Marquard

Criticality

None

Tags (folksonomy)

None

Fix versions

Affects versions

2.3.1

Priority

Major
Configure