Thread: .htaccess
View Single Post
Old 2007-01-29, 10:06 PM   #3
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
The problem with doing it with php is twofold. One, it doesn't easily support chunked output. Secondly, it adds some buffering to the page.

Lets say you have a page that consists of 100k of HTML. With Apache's internal gzip/deflate, it grabs a chunk, compresses it, sends it, grabs another chunk, sends it, etc.

With php's gzip, it takes the entire page and sends it as one chunk. Remember, until the browser has the html, it doesn't know what external scripts, css, images, etc need to be rendered in the page. The result is that you can't even start rendering a page until the complete gzipped page is received. The net effect is a 2-3 wait, unzip, slam the html on the screen, then start fetching the images, css, etc.

It shouldn't affect search engine rankings. Google, et al all seem to have no problem with it.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote