Thursday, December 3, 2009

GZip through PHP - Optimizing Website Performance

So my buddy and co-worker Steve gave me a tip on using GZip in PHP.

Apparently, this functionality of PHP can be used if it's enabled through your Apache server. The function it performs is that of zipping up all the file contents of a web page and delivering them to the browser quicker.

I did a little bit of Googling on it, and found this tidbit of code in which I placed on the first line of every page:

ob_start("ob_gzhandler");


Now I should give you my disclaimer here: I have a lot on my plate. With a girl, kid, and a full time job, I have to do what I can when I get a few moments here and there. So, in short, this solution is not fully researched.

I will tell you though that I see remarkable improvement. I got wind that it would decrease page size some 70 percent. It seems to be working well so far.

Advice here is to do a little bit of research on it. And if you're kind enough, share any thoughts or findings on this in the comments.

No comments:

Post a Comment