Current location: Hot Scripts Forums » Programming Languages » PHP » Checking whether your site is gzipped


Checking whether your site is gzipped

Reply
  #1 (permalink)  
Old 06-07-03, 02:31 PM
jrobbio's Avatar
jrobbio jrobbio is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Loughborough, England
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Checking whether your site is gzipped

Ever wondered why slashdot.org loads up so quickly yet it has masses of information? Well they use ModGzip to compress their files to become 73% smaller
Filesize: 39.8KB [10.7KB] html / text only

This can be done through the .htaccess, but more interestingly it can be done through php. Many forums have the settings in built to allow for compression to be used from levels 1-9 depending on how much strain they are willing to put on the server. There is a tutorial on how to do this here: PHP zlib compression

Once this is done, you can check how well your site is performing with the new compression at the gzip compression test

Rob
__________________
Webmaster forums
Reply With Quote
  #2 (permalink)  
Old 06-07-03, 02:40 PM
TheGreatOne's Avatar
TheGreatOne TheGreatOne is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Pc Desk
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
If you can get it to work brillaint. That page loads up sooooooooo quick! I think i will be using this if i can.
__________________
## Like Music ?? ##

~~ http://www.theenergyradio.com ~~
Reply With Quote
  #3 (permalink)  
Old 06-07-03, 05:10 PM
DuEy's Avatar
DuEy DuEy is offline
PHP is my life.
 
Join Date: Jun 2003
Location: New Zealand
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
How can it be done in .htaccess =?
__________________
-Duey
server: irc.chatchannel.org
channel: #hotscripts
Reply With Quote
  #4 (permalink)  
Old 06-07-03, 05:26 PM
TheGreatOne's Avatar
TheGreatOne TheGreatOne is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Pc Desk
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
That worked brillaint mate. Thank you very much!. Can this be done with cgi do you know???

Just to say how good.
-----------------------

Result The webpage is COMPRESSED / GZIPPED!

>> Savings: 82%

Filesize: 28.6KB [5.3KB] html / text only

Protocol/Status HTTP/1.1 200 OK

Date Sat, 07 Jun 2003 22:18:47 GMT

Server Apache/1.3.27 (Unix) (Red-Hat/Linux) Chili!Soft-ASP/3.6.2 mod_ssl/2.8.14 OpenSSL/0.9.6b PHP/4.1.2 FrontPage/5.0.2.2510

Content-Encoding gzip

Vary Accept-Encoding

X-Powered-By PHP/4.1.2

Content-Length 5072

Connection close

Content-Type text/html


---------------------


I would love to do this with my forums. So any more info would be welcome
__________________
## Like Music ?? ##

~~ http://www.theenergyradio.com ~~
Reply With Quote
  #5 (permalink)  
Old 06-07-03, 05:40 PM
jrobbio's Avatar
jrobbio jrobbio is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Loughborough, England
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
See this post for information about the .htaccess: http://www.desilva.biz/forum/showthr...=2756#post2756

82%! that's the best improvement I've seen yet in fact that's amazing. I'd tried your site earlier on and it did seem kind of sluggish, tried it just now and its lovely.

By using the .htaccess files, the code doesn't need to be repeated over and oover again, but with a CMS the index file is sufficient, the same for forums.

One word of warning though, put any kind of flash file in its own folder and have a .htaccess file that turns off the compression or it won't work.

Rob
__________________
Webmaster forums
Reply With Quote
  #6 (permalink)  
Old 06-07-03, 05:47 PM
DuEy's Avatar
DuEy DuEy is offline
PHP is my life.
 
Join Date: Jun 2003
Location: New Zealand
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
thanks man. my clients just got a faster site =)
__________________
-Duey
server: irc.chatchannel.org
channel: #hotscripts
Reply With Quote
  #7 (permalink)  
Old 06-07-03, 05:59 PM
jrobbio's Avatar
jrobbio jrobbio is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Loughborough, England
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
They'll be happier with you in the morning :') Just make sure you keep a check on the CPU intensity if its a busy site. It should reduce bandwidth costs around a third in many cases.

Rob
__________________
Webmaster forums
Reply With Quote
  #8 (permalink)  
Old 06-07-03, 06:33 PM
TheGreatOne's Avatar
TheGreatOne TheGreatOne is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Pc Desk
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
mate did you know if it can be done in cgi?
__________________
## Like Music ?? ##

~~ http://www.theenergyradio.com ~~
Reply With Quote
  #9 (permalink)  
Old 06-07-03, 06:38 PM
DuEy's Avatar
DuEy DuEy is offline
PHP is my life.
 
Join Date: Jun 2003
Location: New Zealand
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
You would probably need the gzip module for CGI
__________________
-Duey
server: irc.chatchannel.org
channel: #hotscripts
Reply With Quote
  #10 (permalink)  
Old 06-07-03, 06:42 PM
jrobbio's Avatar
jrobbio jrobbio is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Loughborough, England
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
The answer is, I don't know. One of the best tutorials I've seen about it is here though: http://www.sitepoint.com/article/1029

Ahh found the answer and lucky for you it is a yes, http://packages.debian.org/stable/we...-mod-gzip.html

Rob
__________________
Webmaster forums
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Too bad for webmaster who were stealing idea from another site - Look ! kevin PHP 3 02-18-04 11:24 AM
I am working on a site and need suggestions coolgy768 Script Requests 1 09-10-03 02:01 PM
theme enabled 'blogging' site lutser_kingfish Website Reviews 0 09-06-03 03:31 PM
I developed a site .... Adi New Members & Introductions 3 08-23-03 11:02 AM
Does anyone know what type of script this site uses The Probuilder Script Requests 3 08-22-03 02:03 PM


All times are GMT -5. The time now is 05:08 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.