note 56550 added to function.ob-gzhandler
| From: | lapoint2 at msu dot edu | Date: | Wed, 07 Sep 2005 01:40:15 +0000 |
| Subject: | note 56550 added to function.ob-gzhandler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94838@lists.php.net to get a copy of this message | ||
So why doesn't the web server just do this by default?
This works for me if I do:
ini_set('zlib.output_compression_level', 3); ob_start("ob_gzhandler");
or even just:
ob_start("ob_gzhandler");
I did the level 3 compression, I think the default was 6 and I didn't want to put too much load
on the server. For a 895k file (my largest) the compression levels were:
1 = 189k
3 = 178k
4 = 163k
6 = 156k (I believe 6 is the default if you leave out the ini_set)
9 = 155k
I use http://www.whatsmyip.org/mod_gzip_test/
to check the sizes.
FYI: This works with dynamic files in Movable Type 3.x (I'm testing it in 3.2) I've got
the above command in the first line of my mtview.php file.
More info here: http://www.whatsmyip.org/forum/viewtopic.php?t=43
On several sites I've read the some browsers don't like compressed CSS.
----
Manual Page -- http://www.php.net/manual/en/function.ob-gzhandler.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56550
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56550&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56550&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56550&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56550&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56550&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56550&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56550&report=yes
Search -- http://master.php.net/manage/user-notes.php