Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gzip or not to gzip - This is my question! 1

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
0
0
US
Is there a benefit to compressing rendered output in PHP?

My first thought is NO since it can increase load/push time thus making your website slower.

What do you guys/gals have to say about pros and cons the use of gziplib?

--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
I may be mistaken, but I suspect you are confusing what the ZLib library does.

It does not compress output per se.

It generates compressed files or strings in gz format. i.e if you wanted to automatically produce a compressed archive for download from the website. Or compress a string to then store in a file directly.

It does not and should not be used to compress the final HTML code output, otherwise no browser would be able to do anything with it. Browsers do not decompress gz formatted data.

Or are you talking about something else?









----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Nope, you are not mistaken - I was ...

I can now see, how this is very useful.

Thanks!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top