views:

32

answers:

1

I was going on a binge to increase speed of my website and optimize what I can within reason, one thing I wanted to go into was editing some Apache/MySQL configurations so I can decrease page loading time, I wanted to try something with .htaccess but I hate 500 errors that ensues, as I got PHP I'm wishing to do GZIP compression there.

What would I add, and some pointers on how I should implement it in my own code?

And also, GZIP is a part of what compression library?

+3  A: 

Conventionally you would only need to add ob_start("ob_gzhandler") to the first of your page, be sure you output no content beforehand and it will take care of all of the rest for you. You may want to ensure the browser isn't Netscape (3) as it can't handle GZ encodings.

And also, GZIP is a part of what compression library?

GZIP is part of the ZLib library, and thus requires it as a dependancy.

Nullw0rm
Gotta watch out for those hordes of Netscape 3 users! :)
Jeff
Yup. It's fun indeed to see piles of sites spew out crap.
Nullw0rm