gaberville Posted March 29, 2004 Posted March 29, 2004 I'm not sure if this is the correct place to post this, but here goes. Over the past couple days I have been trying to cut the fat out of my site. I was on a friends dial up connection and vas very unhappy with the load time of my site. So I went in and optimized the logo and completely removed some graphics. I went with a css style nav in favor of the image rollover links I had. It seem a lot faster now. In general, what is a good load time? -gabe Quote
kaseytraeger Posted March 29, 2004 Posted March 29, 2004 I've always heard 10 seconds as the magic number, meaning that if a page doesn't load in 10 seconds, users are likely to move on to another web site. However, that 10 seconds "rule" may apply only to DSL and cable modem subscribers. I haven't had dial-up in many years, but I seem to remember having more patience when I was on dial-up. So perhaps dial-up customers are accustomed to no more than 20 second load times (?). Just some food for thought! Quote
TCH-Don Posted March 29, 2004 Posted March 29, 2004 I seem to remember that if they do not see anything for 10 seconds they will move on. So be sure they have something for them to see right away. I believe the majority are still on dial-up, so you may want to get a free dial-up account like netzero to check on your site now and then. It can be an eye opener Quote
DarqFlare Posted March 29, 2004 Posted March 29, 2004 Something to consider is making large images progressive. There are upsides and downsides to doing so, but the upside is that if you've got a big page coming, having some images on progressive will allow the user to have something to look at while the page is loading. Quote
gaberville Posted March 30, 2004 Author Posted March 30, 2004 Well after optimizing all my images and using http compression, I am pretty happy with the results. Download Times* Connection Rate Download Time 14.4K ----------28.68 seconds 28.8K----------14.94 seconds 33.6K ----------12.98 seconds 56K----------8.27 seconds ISDN 128K----3.36 seconds T1 1.44Mbps---1.39 seconds If you read this and you are on dial up, please check out my site and let me know if it seem to load quick. --check my sig for the link-- thanks -gabe Quote
kaseytraeger Posted March 30, 2004 Posted March 30, 2004 Gabe, What http compression software did you use? Although I'm on DSL, your page still loaded much more quickly than others. Plus, it all showed up almost instantaneously (as opposed to parts of it showing up while the rest loads). I'd like to replicate your very quick results on my web pages! Quote
gaberville Posted March 30, 2004 Author Posted March 30, 2004 The compression is called Mod-gzip for apache web servers. I cut my download times down by about 80%. You can analyze your page here and here. This is my report. Quote
kaseytraeger Posted March 30, 2004 Posted March 30, 2004 Thanks Gabe!!! I've bookmarked those pages for future reference. I know they're going to come in handy!!! Quote
webgyrl Posted April 4, 2004 Posted April 4, 2004 Gabe, I am on a terribly slow dial-up connection and it loaed with lightning speed! YAY I was reading stats the other day and over 80% of the worlds internet users are on 56K or below connections. Only 16% use DSL/Cable or better. Those are worldwide numbers. It blew my mind and made me think a lot about my future designs! Thanks for the link to that program. Nat Quote
gaberville Posted April 4, 2004 Author Posted April 4, 2004 No problem. I just happened to come across it, applied it to my site and was pleased with the results. So I figured I would pass it on. Quote
webgyrl Posted April 4, 2004 Posted April 4, 2004 Gabe, Just wondeirng about that program you used. It says it's for Apache servers... does that mean it only works for those servers or could I use it in general to help the d/l time for the sites I design and maintain? I have got to trim a lot of fat it seems- my analysis shows slow d/l times for 56k and under. Nat Quote
TCH-Rob Posted April 4, 2004 Posted April 4, 2004 Nat, Most LINUX servers, those here as well, use Apache. Rest assured that your sites here should have no problem with that. Gabe, where is a good place to put that script? Header, footer, main page? Quote
webgyrl Posted April 4, 2004 Posted April 4, 2004 Rob, Thanks for clearing that up. I knew the servers were LINUX, but wasn't sure if Red Hat was the same as Apache. I'm kinda unschooled as far as all that goes. Oh dear, I have SO much to learn! LOL Merci, Nat Quote
gaberville Posted April 4, 2004 Author Posted April 4, 2004 Nat, Most LINUX servers, those here as well, use Apache. Rest assured that your sites here should have no problem with that. Gabe, where is a good place to put that script? Header, footer, main page? As long as its installed(it is here) this is the php code you need to add to the top of your page. ><?php ob_start( 'ob_gzhandler' ); ?> <html> <head> </head> <body> <p>This web page is now COMPRESSED!</p> </body> </html> Just add it above your html.^^^the html was added fro reference^^^ -gabe Quote
TCH-Bruce Posted April 4, 2004 Posted April 4, 2004 Thanks for clearing that up. I knew the servers were LINUX, but wasn't sure if Red Hat was the same as Apache. I'm kinda unschooled as far as all that goes. Oh dear, I have SO much to learn! LOL Merci, Nat Nat, LINUX is an operating system. Red Hat is just one version of Linux. Apache is a web server program that runs on Linux and other operating systems. Jus trying to help. Quote
webgyrl Posted April 6, 2004 Posted April 6, 2004 Thanks for clearing that up. I knew the servers were LINUX, but wasn't sure if Red Hat was the same as Apache. I'm kinda unschooled as far as all that goes. Oh dear, I have SO much to learn! LOL Merci, Nat Nat, LINUX is an operating system. Red Hat is just one version of Linux. Apache is a web server program that runs on Linux and other operating systems. Jus trying to help. Bruce, Thanks for schooling me! I really appreciate that you take time to explain stuff like that because it really is helpful to know. Nat Quote
webgyrl Posted April 6, 2004 Posted April 6, 2004 I have been trying to download that compression program, but each of the mirror sites I have tried to access just freezs up my browser. Anyone know of a reliable download site for this program? Thanks, Nat Quote
snipe Posted April 6, 2004 Posted April 6, 2004 I have been trying to download that compression program, but each of the mirror sites I have tried to access just freezs up my browser. Anyone know of a reliable download site for this program? Thanks, Nat I downloaded it and threw it up on my box, in case it might help: http://snipe.net/showntell/mod_gzip/mod_gzip-1.3.26.1a.gz Quote
kaseytraeger Posted April 6, 2004 Posted April 6, 2004 OK, please don't lash me with a wet noodle for asking such a basic question... How do I unzip a .gz file? I downloaded the mod_gzip compressed file and wanted to unzip it. I've got WinZip installed on my computer, but I don't know if it works unless the file is compressed using the proprietary .ZIP format. At the very least, it wouldn't open this file. Anybody want to tutor to a .gz newbie? Thanks! Quote
TCH-Bruce Posted April 6, 2004 Posted April 6, 2004 (edited) Kasey, Upload the file to your public_html folder and then open File Manager, select the file and select Uncompress from the options. I did that, and it extracted nothing that I can see. I'm curious as to why Winzip wouldn't open the archive either since I have opened .gz files before. Edited April 6, 2004 by TCH-Bruce Quote
arvind Posted April 6, 2004 Posted April 6, 2004 That php line ure meant to add doens't work for me. http://www.desilva.biz/php/zlib.html says ure meant to have "zlib: fopen wrapper" bit when u call phpinfo() which doesn't appear when I call phpinfo() on my server 34. I've extracted that mod_gzip file but have got all these weird C files what am I doing wrong ? Quote
arvind Posted April 6, 2004 Posted April 6, 2004 Kasey, Upload the file to your public_html folder and then open File Manager, select the file and select Uncompress from the options. I did that, and it extracted nothing that I can see. I'm curious as to why Winzip wouldn't open the archive either since I have opened .gz files before. Yes I had the same problem with the cpanel extractor there's nothing in that file :S Quote
kaseytraeger Posted April 6, 2004 Posted April 6, 2004 Bruce, There wasn't an option for "uncompress," but there was an option for "extract." I chose this option. As you pointed out, it didn't seem to do anything. How am I supposed to find out if this will work? Should I just go ahead and put the following code inside a web page and test it out? ><?php ob_start( 'ob_gzhandler' ); ?> Quote
kaseytraeger Posted April 6, 2004 Posted April 6, 2004 do you have shell access? snipe, I thought shell access was disable for TCH users because of security reasons. We can ftp into our domain, but from what I was told, we can't telnet. Does anyone know if this has changed? Quote
TCH-Bruce Posted April 6, 2004 Posted April 6, 2004 do you have shell access? snipe, I thought shell access was disable for TCH users because of security reasons. We can ftp into our domain, but from what I was told, we can't telnet. Does anyone know if this has changed? The only people with shell access are those on dedicated servers. Quote
MikeJ Posted April 6, 2004 Posted April 6, 2004 The compression is called Mod-gzip for apache web servers. I cut my download times down by about 80%. Let me clear a couple things up. Gaberville is NOT using mod_gzip module for Apache, he is using PHP's ability to do gzip compression (http://us3.php.net/manual/en/function.ob-gzhandler.php). People are free to use this as long as it doesn't produce too much load on their shared server (so if you have a high volume site on a shared server, use with caution). If you find zlib support is not enabled in PHP, submit a support ticket to request it be enabled for your server. Mod_gzip is NOT installed on TCH servers, and won't be because through testing it was found to produce too much load on the CPU's (that info comes from Head Guru Bill). For those with a dedicated server, to enable mod_gzip for apache if you want try it, all you have to do is select "Update Apache" in your WebHost Manager, make sure mod_gzip is selected in the options, and do a rebuild of Apache. You may have to modify your httpd.conf afterwards to enable full functionality (see the mod_gzip documentation which you can get by downloading a copy of the source code, linked in previous posts). I would only recommend doing this, though if you are comfortable making changes on your server and troubleshooting any problems that might arise. You can also download and install mod_gzip on a dedicated server manually as Snipe did. Quote
kaseytraeger Posted April 6, 2004 Posted April 6, 2004 Wow, I just tried it on one of my pages and got a 66% compression! Cool Quote
webgyrl Posted April 8, 2004 Posted April 8, 2004 I downloaded it and threw it up on my box, in case it might help Snipe! Got it! Thanks so much Now just so I don't get into trouble... Can I use this program here at TCH? I have a regular starter hosting accounts. Please let me know if this would be OK to use to see if it helps the load times for the sites I have hosted here. Thanks, Nat Quote
MikeJ Posted April 8, 2004 Posted April 8, 2004 Can I use this program here at TCH? I have a regular starter hosting accounts. Just to be clear if in case my previous post wasn't, mod_gzip is a webserver module that would have to be installed by an admin, but won't be installed by TCH admins on the shared servers because to enable gzip compression on all sites creates too much load (compressing all the pages in real time as they are served uses a lot of CPU). Snipe was able to install it because she has a dedicated server. You are, however, free to use the PHP method of gzip compression. Quote
Wilexa Posted April 8, 2004 Posted April 8, 2004 One quick note to those following this thread: the compression really only affects text. gzip doesn't help graphics, music, and other binary files (unless I am totally mistaken). So its effects are most pronounced on long, text-heavy pages with a few small graphics. If your page is 35K of text plus 200K of graphics you will go down from 235K total to 215K total or so. A little help, sure, but a relatively small percentage. You are basically trading processor load on the server and the browser's computer for a reduction in bandwidth/download time. ...dave Quote
webgyrl Posted April 9, 2004 Posted April 9, 2004 Dave, That's good to know. I was mostly concerned about getting graphics to load faster... so maybe using this won't help much after all. Thanks, Nat Quote
Deverill Posted April 9, 2004 Posted April 9, 2004 I was mostly concerned about getting graphics to load faster Your best bet is a graphics program that does all of the fancy stuff related to making graphics smaller. Make sure you use gif or jpg as appropriate because they are both strong but different. Gifs are better for solid sections of color and jpg is better for photo type things where there is little chance of having the same color pixels together in groups. No matter how much compression you could get on the stream out, you're better off sending smaller images to start with. Quote
webgyrl Posted April 9, 2004 Posted April 9, 2004 Jim, I use Fireworks to optimize all my graphics and slice them up. Maybe I am doing all I can to compress already and there is nothing else I can do? I use the method you stated above... whenever possible I use GIF... I use JPG for photo's mostly and they are compressed at 70 or 80. Oh well.... maybe there isn't much I can do for some types of layouts. Thanks for the pointers. Nat Quote
Deverill Posted April 9, 2004 Posted April 9, 2004 Do you use the ability to compress different slices differently? One technique I picked up in a book is to compress fringes more than the middle because in some cases you can get by with it... but it does help to be able to do this in some cases. Quote
webgyrl Posted April 9, 2004 Posted April 9, 2004 Jim, Yes I compress slices at different compression rates... Depending on what the graphic is and how important clear display is... I will play with different formats and compression to see what produces the best visual result with the fastest d/l time. My load times are not terrible, but I try to always re-evaluate things to see if I can make graphics/pages/text load faster. Nat Quote
voilsb Posted April 10, 2004 Posted April 10, 2004 mod_gzip is a webserver module that would have to be installed by an admin, but won't be installed by TCH admins on the shared servers because to enable gzip compression on all sites creates too much load (compressing all the pages in real time as they are served uses a lot of CPU). According to Head Guru (here), mod_gzip was being installed on the shared servers. That ended up getting cancelled, I take it? Also, from what all I've read, even on high-volume servers mod_gzip creates at worst a nominal increase in load, and can potentially even *reduce* cpu load, depending on filesizes and configuration. Quote
karlfranz Posted April 10, 2004 Posted April 10, 2004 I just have to add <?php ob_start( 'ob_gzhandler' ); ?> above my <html> code and my page is compressed? No other steps I have to do? Quote
DarqFlare Posted April 10, 2004 Posted April 10, 2004 My load on my website's normal pages is pretty decent, considered I moved to all-JPG images for better clarity... Every one in awhile I go around and try to find ways to decrease the size and load times... Quote
karlfranz Posted April 23, 2004 Posted April 23, 2004 To compressed my page I just have to add this over my html code? <?php ob_start( 'ob_gzhandler' ); ?> Any things else I have to do? Quote
kaseytraeger Posted April 23, 2004 Posted April 23, 2004 Nope, just add that one line of PHP code and you're set! I tried it, and it reduced my page time by 66%. Quite a difference! Quote
MikeJ Posted April 23, 2004 Posted April 23, 2004 According to Head Guru (here), mod_gzip was being installed on the shared servers. That ended up getting cancelled, I take it? Also, from what all I've read, even on high-volume servers mod_gzip creates at worst a nominal increase in load, and can potentially even *reduce* cpu load, depending on filesizes and configuration. Sorry, I missed your reply. Yes, that was cancelled. I was told by the TCH staff that their actual live testing with it activated for the entire server produced too much load, so the decision was made, at least for now, not to enable it server wide. Quote
kajoiner Posted April 23, 2004 Posted April 23, 2004 To compressed my page I just have to add this over my html code?<?php ob_start( 'ob_gzhandler' ); ?> Any things else I have to do? I added this to my pages and it increased the load time. How do I check to see if this is turned on on server 58? Quote
TCH-Rob Posted April 23, 2004 Posted April 23, 2004 To compressed my page I just have to add this over my html code?<?php ob_start( 'ob_gzhandler' ); ?> Any things else I have to do? I added this to my pages and it increased the load time. How do I check to see if this is turned on on server 58? Taken from MikeJ a few posts up; Let me clear a couple things up. Gaberville is NOT using mod_gzip module for Apache, he is using PHP's ability to do gzip compression (http://us3.php.net/manual/en/function.ob-gzhandler.php). People are free to use this as long as it doesn't produce too much load on their shared server (so if you have a high volume site on a shared server, use with caution). If you find zlib support is not enabled in PHP, submit a support ticket to request it be enabled for your server. Quote
kajoiner Posted April 23, 2004 Posted April 23, 2004 Thanks Rob, but I saw that. I guess what I should have asked is how do I know if zlib is supported on my server. Since it does not reduce load times, should I assume that zlib is not supported? Quote
MikeJ Posted April 23, 2004 Posted April 23, 2004 (edited) Use this script on your server: <?php phpinfo(); ?> Then look for "ZLib Support" in the output to see if it's enabled or not. Edited April 23, 2004 by TCH-MikeJ Quote
kajoiner Posted April 23, 2004 Posted April 23, 2004 Does this mean that it should be working? I am not sure how to read this. Quote
TCH-Rob Posted April 23, 2004 Posted April 23, 2004 That does mean it is enabled. I do not use that script though so I cant say for sure the exact results "you" should be getting but it is turned on. Quote
karlfranz Posted April 24, 2004 Posted April 24, 2004 This method only affects text contents,but not grahics? Beside,Should I change the extension to*.php if using this function?(I don't know php) Quote
TCH-Rob Posted April 24, 2004 Posted April 24, 2004 This method only affects text contents,but not grahics?Beside,Should I change the extension to*.php if using this function?(I don't know php) AFAIK, yes only text. You will need to compress your images on your own. This function needs to have the page it is included in have a .php extension. If my page ends in .html and I include that snippet of code I can change the extension to .php and it should work. Dont forget to update your links though. Quote
MikeJ Posted April 24, 2004 Posted April 24, 2004 Just to put a confirmation to that, yes, it only compresses text. Most images are already compressed, so attempting to compress them further would likely have a negative overall performance effect. Quote
karlfranz Posted May 2, 2004 Posted May 2, 2004 Hey,can this function applied to Advanced guestbook? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.