 |

04-17-2008, 09:26 AM
|
|
WebProWorld Member
|
|
Join Date: Jan 2008
Location: KY
Posts: 30
|
|
How to Compress HTML Files ?
I use a shopping cart hosted by Pinnacle cart and Im trying to compress my html files so they are not so big. Right now my home page is showing 380k. I changed all the images on it to lower but its still showing a lot. I tried to use httpZip 3.8.4 from Port80 Software: Microsoft IIS Web Server Tools & HTTP Solutions but it would'nt work because I do not have a dedicated server. So if anyone has any suggestions on what I can do to get my pages to load faster and shrink my file sizes I'm all ears.
Thanks
|

04-17-2008, 11:02 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 395
|
|
Re: How to Compress HTML Files ?
Where did you get the 380k figure from? If it was from Dreamweaver for example, that figure could be misleading. Anyway, 380k is not huge. If speed is your quest, try using tracert to make sure there are no slow computers between yours and your web server. It may just be your server or your servers internet connection is slow.
Make sure that all your CSS and JavaScript are in separate files. That way they are only loaded once for the site, not repeated every page. Reduce reliance on tables by putting layout into the CSS. Use the same graphics on more than one page, so they are only loaded once for the site.
|

04-17-2008, 02:50 PM
|
|
WebProWorld Member
|
|
Join Date: Jan 2008
Location: KY
Posts: 30
|
|
Re: How to Compress HTML Files ?
Make sure that all your CSS and JavaScript are in separate files. That way they are only loaded once for the site, not repeated every page. Reduce reliance on tables by putting layout into the CSS. Use the same graphics on more than one page, so they are only loaded once for the site.
how exactly do i go about this ?
|

04-17-2008, 06:12 PM
|
|
WebProWorld New Member
|
|
Join Date: Apr 2008
Posts: 1
|
|
Re: How to Compress HTML Files ?
i am working at software company and it would be glad for me to extend some help regarding HTML and CSS. the two are actually must be complementary. the absence of either HTML or CSS seems that there is something missing in the element. for more details just go on the link below.
<please add your link to your signature>
Last edited by crankydave : 04-25-2008 at 03:22 PM.
Reason: remove link
|

04-17-2008, 06:21 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2008
Posts: 30
|
|
Re: How to Compress HTML Files ?
Any chance of taking a look at this giant page? Failing that, can you show us a decent chunk of the html?
|

04-17-2008, 07:24 PM
|
|
WebProWorld Veteran
|
|
Join Date: Mar 2006
Location: Maryland, USA
Posts: 996
|
|
Re: How to Compress HTML Files ?
Global Trucker - The issue is the way that Pinnacle Builds it's menu. Because it is a dynamic yet table based menu on the left side, you've got tons of links and table cells that are taking up most of your code.
You can do one of two things. First, try and move that menu out of the page, which isn't easy when it comes to Pinnacle. Otherwise, you can rethink your menus and work on a more simplified menu system.
I've used Pinnacle for years and love the cart but it does take some tweaking. The backend is great, but the frontend leaves some to be desired from a coding standpoint.
|

04-17-2008, 07:32 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2008
Posts: 30
|
|
Re: How to Compress HTML Files ?
Silly me, Global Trucker web-site. Sorry, I thought you were working on something.
|

04-17-2008, 08:06 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,208
|
|
Re: How to Compress HTML Files ?
That's the best joke I've heard all day!
Did you know that almost half the people who access the web in the US are still on dialup???? I rarely make a page larger than 75k max, including all images, html, css. and scripting. And I'm sure my visitor retention rates are much, much better than someone who says "380k is not huge."
|

04-17-2008, 08:28 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2008
Posts: 30
|
|
Re: How to Compress HTML Files ?
Yup, just about 384Kb. Too big for no/slow broadband.
Depending on your knowledge:
You can reduce repetition in some of the html tags. For example every item in your menu is displayed in a table definition
|

04-17-2008, 08:37 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2008
Posts: 30
|
|
Re: How to Compress HTML Files ?
I've no idea why I got cropped, but I'll continue. Depending on your ability/desire to find out.
Moving the attributes from the item table definitions to the stylesheet will save you around 16Kb.
Moving the table attributes (one for each item) to the stylesheet will save you around 16Kb.
Changing the item links from absolute to relative will save around 12Kb (someone's going to shout at me)
48Kb saving fairly simply. Lots more to be had.
|

04-17-2008, 08:45 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,208
|
|
Re: How to Compress HTML Files ?
Quote:
|
Changing the item links from absolute to relative will save around 12Kb (someone's going to shout at me)
|
I'm not shouting, but I will point out that this is a trivial thing to do on a static site. It is NOT trivial to do on a scripted site. May or may not be easily possible. Most likely not, without hacking core.
|

04-17-2008, 08:58 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2008
Posts: 30
|
|
Re: How to Compress HTML Files ?
Hi bj,
I know, I know but GT did say "any suggestions on what I can do to get my pages to load faster and shrink my file sizes". You should see what I didn't say!
|

04-18-2008, 02:38 AM
|
|
WebProWorld New Member
|
|
Join Date: Sep 2006
Location: Kuala Lumpur
Posts: 18
|
|
Re: How to Compress HTML Files ?
Quote:
Originally Posted by bj
Did you know that almost half the people who access the web in the US are still on dialup????
|
That doesn't seem right. In Malaysia (a developing country in South-East Asia), broadband penetration is estimated at 30%!
|

04-18-2008, 07:41 AM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2004
Posts: 981
|
|
Re: How to Compress HTML Files ?
Quote:
Originally Posted by Global Trucker
|
Sure it didn't work because your server is Apache 1.3 on an Unix machine.
If you don't want to spend a lot of time on redesign and you have access to your server .conf file, you can use mod_gzip solution.
Otherwise you can ask your hosting company to enable the module for you.
__________________
Impossible? You just underestimate the time.
Last edited by activeco : 04-18-2008 at 07:50 AM.
|

04-18-2008, 09:45 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 395
|
|
Re: How to Compress HTML Files ?
Quote:
Originally Posted by bj
That's the best joke I've heard all day!
|
As I said, it depends on how you measure page size. If you use Firefox' estimate then you will typically get a page size that's a quarter (or less) of the size Dreamweaver tells you. That could make your well designed page of 75K grow to 300K or more. Which you seem to imply is not huge. What I meant to say in my previous post is that if you use the Dreamweaver measurement, then ...
Anyway, I would certainly advocate working to reduce page size although with a bought in system, your scope is limited.
|

04-18-2008, 01:38 PM
|
|
WebProWorld Member
|
|
Join Date: Feb 2004
Posts: 52
|
|
Remove the redundant "space" characters
The global trucker page has over 200KB of redundant "space" characters within its HTML.
These space characters are ignored by web browsers so are just adding useless extra size to the HTML file.
Is there an option in your software which will stop these "spaces" being generated?
With "static" web pages, they could be removed easily. Also software is available which removes redundant characters from HTML (sometimes called "compressing" the HTML).
Richard
|

04-18-2008, 01:50 PM
|
|
WebProWorld Member
|
|
Join Date: Feb 2004
Posts: 52
|
|
Remove Redundant Javascript & HTML
Large chunks of Javascript & HTML on the Global Truckers Home page look redundant and unused.
For example, why all the Javascripts concerned with "logins" and "registration"?
Also, see the speed analysis report (courtesy of the Web Developer extension to Firefox):
http://www.websiteoptimization.com/s...altrucker.com/
Richard
|

04-18-2008, 02:01 PM
|
|
WebProWorld Member
|
|
Join Date: Apr 2008
Posts: 30
|
|
Re: How to Compress HTML Files ?
richard-s I think you mean 20Kb
|

04-18-2008, 06:18 PM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2004
Posts: 981
|
|
Re: How to Compress HTML Files ?
Quote:
Originally Posted by activeco
|
I have no idea how this originally wrong link (this is for Apache 2) ended here.
The right one is: Compress Web Output Using mod_gzip and Apache [Server Side Essentials]
__________________
Impossible? You just underestimate the time.
|

04-18-2008, 08:18 PM
|
 |
Moderator
|
|
Join Date: Jun 2004
Location: USA
Posts: 2,356
|
|
Re: How to Compress HTML Files ?
Quote:
Originally Posted by bj
Did you know that almost half the people who access the web in the US are still on dialup????
|
Depends on whose statistics you read. I've read a 2006 report showing dial-up users being 22%. Whichever number, it's still a lot. Parks Associates - Internet Finding Few Newcomers in 2006
Another report, also from 2006 shows average page file size being 130K, images and flash included.
The Average Web Page - Preliminary Results
Hope this helps.
__________________
Domain Name Registration and Website Hosting :: DesignerTrade
Last edited by jawn_tech : 04-18-2008 at 08:22 PM.
|

04-18-2008, 08:46 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,208
| | |