JavaScript compression is a code compression mechanism that allows us to compress and minify JavaScript files. In the programming world, this compression mechanism is called “Code Minification”. In JavaScript, it is achieved by removing extra white space, comments and unwanted characters. The size of the file will be reduced by 30%-80%. However, the functionality of the code remains unaltered despite aggressive compression.
In Design Studio, SAP supports JavaScript compression from version 1.3 SP01. With this new feature, we can achieve the following performance enhancements.
Steps to enable JavaScript compression
Step 1:
Stop the Apache Tomcat server. If Tomcat is deployed across multiple nodes, stop all Tomcat servers.
Step 2:
Open the “InstallPath\SAP BusinessObjects\tomcat\conf\server.xml” file and search for the connector port tag.
Step 3:
Under the connector port tag the following attributes are available – noCompressionUserAgents and compressableMimeType.

Step 4:
Add ‘application/javascript’ at the end of the compressableMimeType attribute values. This will enable JavaScript compression.

Step 5:
Apply these settings in all Tomcat servers. If deployed across multiple nodes, start all the Tomcat servers.
This compression would be help in a production environment where the application loading time is critical. Reduced size of the application would help in improved load time and server throughput.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 31 | |
| 19 | |
| 17 | |
| 16 | |
| 12 | |
| 10 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |