apache deflate モジュールを使用して、アプリケーションから送信された Excel スプレッドシートを圧縮しようとしています。サイト対応ファイルに次の行を追加しました。
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/excel
しかし、応答データを大きくしているようです???
モジュールなしでfirebugを使用して、アプリケーションからxlsスプレッドシートをダウンロードし、100Kbのデータをダウンロードしました。ファイルシステム上のファイルサイズも予想どおり100Kbでした。上記の方法で deflate モジュールを有効にしてプロセスを繰り返したところ、ダウンロードされたデータ量は 295Kb?? でした。しかし、ファイルシステムに保存すると、ファイルはまだ100Kbしかありませんでした。
実験として、保存した xls ファイルを手動で gzip し、20Kb に圧縮しました。
ここで何が間違っていますか?
deflate の使用 (Firebug の出力):
200 OK xxxxxxx.co.za 293 KB
4.43s
ParamsHeadersPostPutResponseCacheHTML
Response Headers
Date Tue, 03 Nov 2009 13:01:43 GMT
Server Apache/2.2.4 (Ubuntu) mod_jk/1.2.23 PHP/5.2.3-1ubuntu6.4 mod_ssl/2.2.4 OpenSSL/0.9.8e
Content-Disposition attachment; filename="Employee List.xls"
Vary Accept-Encoding
Content-Encoding gzip
Content-Type application/excel
deflate なし (Firebug 出力):
200 OK xxxxxxxx.co.za 100 KB
3.46s
ParamsHeadersPostPutResponseCacheHTML
Response Headers
Date Tue, 03 Nov 2009 13:06:00 GMT
Server Apache/2.2.4 (Ubuntu) mod_jk/1.2.23 PHP/5.2.3-1ubuntu6.4 mod_ssl/2.2.4 OpenSSL/0.9.8e
Content-Disposition attachment; filename="Employee List.xls"
Content-Length 102912
Content-Type application/excel