Reply to Re: To gzcompress or not to gzcompress...

Your name:

Reply:


Posted by Michael Fesser on 08/22/07 15:33

..oO(FFMG)

>I am currently compressing the output of all my pages, (still on the
>beta site so I am not 100% sure of the impact).
>But I have no idea if I am wasting my server CPU time or not, or more
>importantly if I am making any difference to my visitor experience.

Output compression might waste some CPU cycles on a single machine if
it's done on-the-fly, but not compressing wastes network resources and
download time on many machines. Decide yourself what's more important to
you.

>Some pages cam be rather large and they are compressed, (from 160K to
>15k),
>
>But does anybody know if compressing is worth the effort?

Why not simply test it? A network sniffer like <http://web-sniffer.net>
can show you the different sizes - compressed and uncompressed. Usually
it's worth the effort (IMHO), text files like HTML, CSS and JS can be
compressed quite good.

On one of my sites I use the Lightbox2 script (will be replaced with
Litebox2, which is much smaller). Without compression it's currently
about 104 KB (4 files, including the prototype.js framework), compressed
it's only 25 KB. Still a lot, but much better. Both versions are stored
on the server, which uses Content Negotiation to automatically decide
which version to return, dependent on the user agent's capabilities.

>And if it is worth it, why do sites like Joomla offer it, but don't
>make it default?
>Especially given that they test if the browser supports it, (this is
>what $_SERVER['HTTP_ACCEPT_ENCODING'] is for after all.

There are some issues with older browsers (really old ones like NN4),
which may claim that they accept compressed content, but then fail to
properly handle it (IIRC NN4 has problems with compressed JavaScript).

Micha

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация