Compression in Genero Application Server
Compression is enabled by default for the Genero Application Server. You can disable compression on selected resources or for the entire Genero Application Server.
Files managed by the Genero Application Server can be compressed to reduce the size of files sent to the User Agent. The files can be compressed by hand and deployed in the GAS, but it is also possible to configure the GAS to compress application files on the fly.
Compression is configured in the $FGLASDIR/etc/imt.cfg file. This file lists the type of resources that can be compressed. GAS automatically compresses the files with the file extensions listed in imt.cfg.
When does compression take place?
- Installation time
- At application deployment with Genero Archive
- At runtime, when communication files, such as HTTP request/response type files that do not need to be saved on disk, are exchanged between GAS and applications. These are compressed on the fly.
- At runtime when files on disk are requested by applications.Note:At runtime, the GAS checks the imt.cfg to see if the requested file is expected to be a compressed file. If the compressed file is not up to date or is missing, the GAS performs the following:
- It compresses the requested resource on the fly and sends a compressed result.
- A warning is displayed in the GAS log if the compressed file is out of date or is missing. (To prevent these warnings, you will need to update compressed files. You can manually generate the compress files (.gz) with the gasadmin -z command or using another appropriate compression utility command).
- You can compress static files as required using the gasadmin config -z command.
Enabling and disabling GAS compression
Both the gasadmin config -z compression command and the GAS use the imt.cfg file to identify the resources that can be compressed.
# [-] Internet media type Extension
# The optional '-' sign at the beginning can be used to explicitly
# disable compression when sending resources
# Example: see below application/java-archive
#
# Uncomment the following line to completely disable compression
# gas:disable-compression
application/andrew-inset ez
- application/java-archive jar
application/font-woff woff
application/mac-binhex40 hqx
application/mac-compactpro cpt
application/msword doc
...
- application/java-archive jar
To disable all compression by the Genero Application Server, uncomment the
gas:disable-compression
entry in the file.
# gas:disable-compression
gas:disable-compression