jsfアプリケーション(mojarra 2.1.8、primefaces 3.3)をtomcat6で実行しています。Firebugのページをgooglepage-speedで分析しているときに、gzip圧縮によっていくつかのものを最適化できることに気付きました。
Compressing the following resources with gzip could reduce their transfer size by 371,1KiB (74% reduction).
Compressing http://localhost:8080/someApp/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces could save 72,5KiB (74% reduction).
Compressing http://localhost:8080/someApp/javax.faces.resource/theme.css.jsf?ln=primefaces-aristo could save 53,4KiB (71% reduction).
Compressing http://localhost:8080/someApp/javax.faces.resource/jsf.js.jsf?ln=javax.faces could save 49,6KiB (78% reduction).
...
server.xmlですでに圧縮をオンにしました
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"
compression="on"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/plain,application/javascript,application/json,text/javascript"/>
ただし、上記のファイルは圧縮されません。
圧縮を機能させるには、他に何をする必要がありますか?
ジョニー