We have not so much traffic on the server so we can make the traffic faster for user with slow downlinks. My page is about 37kb in size. With mod_geflate i only have 7kb.
---snip
<Location /> # Insert filter SetOutputFilter DEFLATE
# Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug javascript:glossar('/glossar/show.php?idx=108'); in mod_setenvif up to Apache 2.0.48 # the above regex won't work. You can use the following # workaround to get the desired effect: BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images SetEnvIfNoCase Request_URI \ .(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content # Header append Vary User-Agent env=!dont-vary </Location>
DeflateFilterNote ratio DeflateCompressionLevel 9
--snap
Greetings Flacus
-- [[:de:Benutzer:Flacus]][[:de:Benutzer:FlaBot]] http://tools.wikimedia.de/~flacus/IWLC/
FlaBot: Fl> My page is about 37kb in size. With mod_geflate i only have 7kb.
okay, done.
k.
Thanks a lot. For me it look like that *.html and *.css are gziped ...but *.php are not compressed. Can you chnge this ?
Greetings Flacus
-- [[:de:Benutzer:Flacus]][[:de:Benutzer:FlaBot]] http://tools.wikimedia.de/~flacus/IWLC/
FlaBot wrote:
Thanks a lot. For me it look like that *.html and *.css are gziped ...but *.php are not compressed. Can you chnge this ?
Please do NOT enabled this for PHP output per default! This will cause all output to be buffered, which will break some tools that rely on "real time" output, like my CheckUsage tool.
If you want compressed output from PHP, use ini_set('zlib.output_compression','On'); see http://www.php.net/manual/en/ref.zlib.php#ini.zlib.output-compression
Alternatively, you can compress output manually using ob_start/ob_get_contents/ob_end_clean with gzcompress() and header('Content-Encoding: gzip');
Regards, Daniel
toolserver-l@lists.wikimedia.org