Using GZIP compression
GZIP compression greatly reduces the bandwidth needed for loading HTML pages and text resources like JavaScript files and CSS stylesheets. [fleXive] does not come with its own GZIP filter, since this service is often provided by the application server.
Enabling GZIP compression on Glassfish 2
- Open the Glassfish administration console (http://localhost:4848/
)
- Open Configuration > HTTP Service > HTTP Listeners
- Select the listener for the desired port (e.g. http-listener-1)
- Add the following properties on the bottom of the page:
- compression=on
- compressableMimeType=text/html,text/xml,text/plain,text/css,text/javascript,application/json
- Now all the responses should be encoded using GZIP. You can check this using a tool like Firebug
for Firefox or any other HTTP header viewer.
Many people start a career with a dream, then get busy forgetting it.
pickingberry
poprang.com