Play games- Action Rcade
GZip Compression with PHP

HTTP Gzip Compression

Right. I been doing a bit of work on all my websites. I have been learning a bit about CSS compression and other stuff to make all my sites load faster.

Now, my websites are hosted on a shared server and are a little slow depending on the country you live in. My codeing and so forth is not the best and some errors are made, content is wrong,large(.swf) and slow loading that some don't even hang around sometimes.

Something that has been around a while that I didn't know much about and got added to my list of things to learn about is GZip Compression . I see things on the net that may interest me and I have a notebook that contains a list of..well..basicly..things to learn about.

Well today I started my endevour to find out about what GZip is and what GZip does.

What did I find out?

mod_gzip is an Apache web server module that compresses the HTML as it sends it out. It is compatible with all browsers (old browsers that don't support gzip content will get uncompressed HTML). Using gzip can save you HUGE amounts of bandwidth, and increase the overall performance of your webserver. It also makes a world of difference for people viewing your site on a dial-up modem.

I found out that it is a compression algorithm. Similar to ZIP and SIT, gzip is very common. If you are dealing with uncompressed data, you can save tons of space by gzipping your files. You can easily compress a 40K file down to 3K.

How?

Believe it or not, nearly all browsers support gzipped content. Its been built into them for years. Its so easy, you'll think your doing something wrong. Forget mod_gzip. Use PHP instead. All you have to do is put the following line at the VERY top of each PHP document, and just like magic, the entire HTML of the page will be compressed!

Encase that in the php tags.

That was so easy, just paste it at the beginning of your PHP and thats IT! Why is this not standard to all websites and hosts. Or is it?

I'm going to show you two very important links to a websites that is very informative on GZip.

I also understand this is part of some scripts and webhosting. I have it somewhere with SMF..but this just turned it on anyway..the easy way.

Sounds like a sales pitch aye! Well I am so happy I found it and was told about it indepth.

I added this to my SMF Arcade

Original Size: 58 KB
Gzipped Size: 12 KB
Data Savings: 79.31%

I added this to my Topsite

Original Size: 111 KB
Gzipped Size: 15 KB
Data Savings: 86.49%

I added this to my other arcade

Original Size: 50 KB
Gzipped Size: 10 KB
Data Savings: 80%

Amazing!!!!

Here is all about it.. http://whatsmyip.org/mod_gzip_test/phpgzip/
Test your website... http://www.whatsmyip.org/mod_gzip_test/

This page has been viewed 729 times.