navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Speed up your pages the quick, easy, and painless way

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> OutFront Discoveries >> Speed up your pages the quick, easy, and painless way
Page: [1]
 
womble

 

Posts: 5526
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
Speed up your pages the quick, easy, and painless way - 10/15/2006 7:40:25   
I'm working on a site at the moment, and on one particular page I have an include that's form that you input a value into, and the form trundles off around the intraweb and returns interesting information on. Works nicely...but...the form returns the result to itself, resulting in the page reloading, and while it's busy handling all the data, it makes the page reload quite slowly. The main problem with this is that for some unknown reason I've not managed to fathom yet, the page background loads last (it's not a background image, just a "background-color" in the CSS). I've still not managed to figure out why - it's got to be something to do with either the cascade or how I've got the page laid out in <divs>, but I've not had time to get to the bottom of it yet and I've had this problem crop up on odd pages before from time to time. It's an irritation though, so this morning I set off a-googling to see if I could find out what might be causing it - still not managed to get to the bottom of it, but what I have found is something that's solved the problem, in a way that's altogether too easy.

While wandering around I kept seeing reference to "mod_gzip"...

quote:

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.


...but after reading round a bit, discovered that it can be difficult to set up and not all hosts support mod_gzip, but then I came across this (down towards the bottom of the page) - you simply add this to the top of your page:
<?php
ob_start("ob_gzhandler");
?>


...and it automatically gzips the page for browsers that support it. It works with all browsers (though v old browsers that don't support gzip just get it uncompressed), and as most webservers support PHP, it can be used on most pages, and all you have to do is change your files from mypage.html to mypage.php - if you're already using php anyway, it's just an extra line in the top of the page. There's also a discussion here on this method, and another method to compress your pages using .htaccess.

Here you can find a handy tool for testing for gzipped content (or any other compressed content), or test an uncompressed page to see how much bandwidth you could save by compressing your pages. I tried it out on the page I've been having problems with, using the 'stick the php code in the top of the page method' and got this result:
quote:

Original Size: 15 K
Gzipped Size: 5 K
Data Savings: 66.67%


It made all the difference to the page I've been having problems with. :)

- speed up your page load times
- use less bandwidth
- make your pages friendlier for 56k dial-up visitors


_____________________________

~~ "A cruel god ain't no god at all" ~~
:)
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Speed up your pages the quick, easy, and painless way - 10/15/2006 13:03:23   
A great way to test the results is :
http://www.websiteoptimization.com/services/analyze/index.html

And some more info on compression :
http://www.seoconsultants.com/tools/compression.asp

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to womble)
jaybee

 

Posts: 14152
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Speed up your pages the quick, easy, and painless way - 10/15/2006 13:10:06   
Eureka! Thanks Wombly. Don't know why I did't think of Gzip before.

Page Size: 10 K
Size if Gzipped: 3 K
Potential Savings: 70%

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to Spooky)
BobbyDouglas

 

Posts: 5456
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Speed up your pages the quick, easy, and painless way - 10/15/2006 13:40:35   
gzip is especially great for clean designs.

I wrote a nice tutorial on this awhile ago called PHP Compression

The GIDZipTest got me started on PHP Compression awhile ago (the coder of the script has spent quite a bit of time tweaking the settings and such).

The .htaccess code (which can also server in the apache conf file too) is:
quote:

php_flag output_buffering On
php_value output_handler ob_gzhandler
php_flag zlib.output_compression Off


In order to use gzip, you need the zlib module. In order to tell if you have that, create a new php page with the following info inside:
<?php
phpinfo();
?>


Then search for the zlib module

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to jaybee)
Page:   [1]

All Forums >> Community >> OutFront Discoveries >> Speed up your pages the quick, easy, and painless way
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts