GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 30-Jan-2006, 19:38
xeno|oreo xeno|oreo is offline
New Member
 
Join Date: Jan 2006
Posts: 4
xeno|oreo is on a distinguished road

gzip compression


I've looked all over, but I haven't been able to find a good source explaining how to use gzip compression on php files.

I know that my server can do it, because I have a perl based forum that uses gzip compression, which is noticeable, and the gzip test page said it was working. But whatever I try for my own pages, it just doesn't seem to work.

Any tips?
  #2  
Old 30-Jan-2006, 20:45
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,108
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: gzip compression


Hello and Welcome to GIDForums™ xeno|oreo. What have you tried? I usually start with PHP.net.

Right at the top:
PHP Code:

ob_start( 'ob_gzhandler' ); 



Now check the page witht the gzip tool.

HTH,
Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #3  
Old 31-Jan-2006, 15:21
xeno|oreo xeno|oreo is offline
New Member
 
Join Date: Jan 2006
Posts: 4
xeno|oreo is on a distinguished road

Re: gzip compression


Awesome... it worked

I knew it was probably really simple... but I couldn't find anywhere that simply said what it was without going overly in depth. Ah well... I guess now I both know a lot about compression too, along with how to actually do it.

Thanks very much.


Only one question... I am using the gzip code just once on the index page, as the content is loaded in on an include system. Will the content pages also be compressed, or will I have to include the gzip code on all of them too?
  #4  
Old 31-Jan-2006, 18:23
xeno|oreo xeno|oreo is offline
New Member
 
Join Date: Jan 2006
Posts: 4
xeno|oreo is on a distinguished road

Re: gzip compression


Well, it appears to be compressing everything, like I had thought and hoped

Anyways, thanks for the tip

*whistles... nice* Gonna save a lot of bandwidth and page loading time
Size, Markup (bytes) 158,665
Size, Compressed (bytes) 12,759
Compression % 92.0
 
 

Recent GIDBlogLast Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hows on mod gzip installing, another dumb question samserver Apache Web Server Forum 3 16-Feb-2005 07:58
http compression with gzip section31 MySQL / PHP Forum 4 04-Oct-2004 10:44
compression testing software eldiablo4kassa Computer Software Forum - Windows 2 17-Sep-2004 01:49
When to use gzip Allowee MySQL / PHP Forum 3 22-Jun-2003 10:15
How I sorted my website compression problem jrobbio MySQL / PHP Forum 0 05-Mar-2003 20:41

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 02:04.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.