Enable HTTP compression on GlassFish / Payara servers to reduce response time and make web applications faster.
Edit GLASSFISH_HOME//glassfish/domains/domain1/config/domain.xml
Example with a reduction from 136 KB down to 23 KB (5.9x), considerabily reducing the network traffic.
Edit GLASSFISH_HOME//glassfish/domains/domain1/config/domain.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | < network-config > < protocols > < protocol name = "http-listener-1" > < http max-connections = "250" default-virtual-server = "server" compression = "on" compression-min-size-bytes = "128" compressable-mime-type = "text/html,text/css,text/plain,text/xml,application/javascript,application/json" > < file-cache ></ file-cache > </ http > < ssl ></ ssl > </ protocol > < protocol name = "http-listener-2" security-enabled = "true" > < http max-connections = "250" default-virtual-server = "server" compression = "on" compression-min-size-bytes = "128" compressable-mime-type = "text/html,text/css,text/plain,text/xml,application/javascript,application/json" > < file-cache ></ file-cache > </ http > < ssl classname = "com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname = "s1as" ></ ssl > </ protocol > |
Example with a reduction from 136 KB down to 23 KB (5.9x), considerabily reducing the network traffic.
![]() |
Before (without HTTP compression) |
![]() |
After (with HTTP compression) |
No comments :
Post a Comment