Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-17-2008, 09:26 AM
WebProWorld Member
 

Join Date: Jan 2008
Location: KY
Posts: 30
Global Trucker RepRank 0
Default 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
__________________
www.GlobalTrucker.com
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 11:02 AM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 395
DaveSawers RepRank 1
Default 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.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 02:50 PM
WebProWorld Member
 

Join Date: Jan 2008
Location: KY
Posts: 30
Global Trucker RepRank 0
Default 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 ?
__________________
www.GlobalTrucker.com
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 06:12 PM
WebProWorld New Member
 

Join Date: Apr 2008
Posts: 1
chrisgamuyao RepRank 0
Default 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
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 06:21 PM
WebProWorld Member
 

Join Date: Apr 2008
Posts: 30
Uncle Dog RepRank 0
Default 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?
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 07:24 PM
WebProWorld Veteran
 

Join Date: Mar 2006
Location: Maryland, USA
Posts: 996
weslinda RepRank 2
Default 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.
__________________
We offer a total eCommerce solution with eCommerce Web Design using Pinnacle Cart
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 07:32 PM
WebProWorld Member
 

Join Date: Apr 2008
Posts: 30
Uncle Dog RepRank 0
Default Re: How to Compress HTML Files ?

Silly me, Global Trucker web-site. Sorry, I thought you were working on something.
Reply With Quote
  #8 (permalink)  
Old 04-17-2008, 08:06 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 

Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,208
bj RepRank 2bj RepRank 2
Default Re: How to Compress HTML Files ?

Quote:
380k is not huge.
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."
Reply With Quote
  #9 (permalink)  
Old 04-17-2008, 08:28 PM
WebProWorld Member
 

Join Date: Apr 2008
Posts: 30
Uncle Dog RepRank 0
Default 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
Reply With Quote
  #10 (permalink)  
Old 04-17-2008, 08:37 PM
WebProWorld Member
 

Join Date: Apr 2008
Posts: 30
Uncle Dog RepRank 0
Default 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.
Reply With Quote
  #11 (permalink)  
Old 04-17-2008, 08:45 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 

Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,208
bj RepRank 2bj RepRank 2
Default 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.
Reply With Quote
  #12 (permalink)  
Old 04-17-2008, 08:58 PM
WebProWorld Member
 

Join Date: Apr 2008
Posts: 30
Uncle Dog RepRank 0
Default 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!
Reply With Quote
  #13 (permalink)  
Old 04-18-2008, 02:38 AM
WebProWorld New Member
 

Join Date: Sep 2006
Location: Kuala Lumpur
Posts: 18
jenteh RepRank 0
Default Re: How to Compress HTML Files ?

Quote:
Originally Posted by bj View Post
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%!
Reply With Quote
  #14 (permalink)  
Old 04-18-2008, 06:23 AM
WebProWorld Member
 

Join Date: Nov 2003
Location: uk
Posts: 43
martindow RepRank 0
Default Re: How to Compress HTML Files ?

It does seem a very complicated site - the page source is over 4400 lines long.

You can try this
Web Page Analyzer - free website optimization tool website speed test check website performance report from web site optimization
which gives suggestions for reducing the page size.

According to them 110 seconds to load on dial up - only the most determined will hang on that long!
__________________
Martin
www.spectrumwellbeing.co.uk
Reply With Quote
  #15 (permalink)  
Old 04-18-2008, 07:41 AM
WebProWorld Veteran
 

Join Date: Jul 2004
Posts: 981
activeco RepRank 2
Default Re: How to Compress HTML Files ?

Quote:
Originally Posted by Global Trucker View Post
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.
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.
Reply With Quote
  #16 (permalink)  
Old 04-18-2008, 09:45 AM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 395
DaveSawers RepRank 1
Default Re: How to Compress HTML Files ?

Quote:
Originally Posted by bj View Post
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.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #17 (permalink)  
Old 04-18-2008, 09:52 AM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 395
DaveSawers RepRank 1
Default Re: How to Compress HTML Files ?

Quote:
Originally Posted by bj View Post
Did you know that almost half the people who access the web in the US are still on dialup????
And of course it depends on where you get your statistics from. A quick Google search suggests the figure is below 20%.

Sources:

» Dialup access statistics - Marketing/Ecommerce Research
US Broadband Penetration to Break 90% by Mid-2008 Among Active Internet Users - Broadband Survey: US Broadband Uptake at 57% Overall - February 2008 Bandwidth Report
etc.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #18 (permalink)  
Old 04-18-2008, 01:38 PM
WebProWorld Member
 

Join Date: Feb 2004
Posts: 52
richard-s RepRank 1
Default 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
Reply With Quote
  #19 (permalink)  
Old 04-18-2008, 01:50 PM
WebProWorld Member
 

Join Date: Feb 2004
Posts: 52
richard-s RepRank 1
Default 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
Reply With Quote
  #20 (permalink)  
Old 04-18-2008, 02:01 PM
WebProWorld Member
 

Join Date: Apr 2008
Posts: 30
Uncle Dog RepRank 0
Default Re: How to Compress HTML Files ?

richard-s I think you mean 20Kb
Reply With Quote
  #21 (permalink)  
Old 04-18-2008, 06:18 PM
WebProWorld Veteran
 

Join Date: Jul 2004
Posts: 981
activeco RepRank 2
Default Re: How to Compress HTML Files ?

Quote:
Originally Posted by activeco View Post
... you can use mod_gzip solution.
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.
Reply With Quote
  #22 (permalink)  
Old 04-18-2008, 08:18 PM
jawn_tech's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2004
Location: USA
Posts: 2,356
jawn_tech RepRank 2jawn_tech RepRank 2
Default Re: How to Compress HTML Files ?

Quote:
Originally Posted by bj View Post
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.
Reply With Quote
  #23 (permalink)  
Old 04-18-2008, 08:46 PM
bj's Avatar
bj bj is offline
WebProWorld 1,000+ Club
 

Join Date: Apr 2005
Location: Delaware Valley, PA
Posts: 1,208