WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2004, 07:23 PM
Webnauts's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Worldwide
Posts: 7,330
Webnauts RepRank 3Webnauts RepRank 3
Default Speed up your website download time!!!

I would like to recommend you to read this tutorial:
http://www.webcredible.co.uk/user-fr...oad-time.shtml
Reply With Quote
  #2 (permalink)  
Old 07-10-2004, 08:21 AM
lspence's Avatar
WebProWorld Pro
 

Join Date: Apr 2004
Location: Saint Louis
Posts: 217
lspence RepRank 0
Default

Thanks for the very helpful link. :)
Reply With Quote
  #3 (permalink)  
Old 07-11-2004, 07:37 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

A lot of the article is pretty erroneous. While I am an advocate of CSS for a lot of purposes, it is not the end-all of speed enhancements like this article claims it to be. To be blunt, some parts are pure bunk.

1.) The author assumes that size of image files, stylesheets, html pages or any other file size has a relationship to download speed. All files are transferred in packets, which can be of adjustable sizes depending on line quality and errorless successess. Usually (don't quote me on this part) the packet size is 1k + 24 bytes of handshaking information. With that said, a file that is 1k + 1 byte over will take just as long as a file that is 2k dead-on.

2.) The article does not take into account the caching of certain images such as spacer GIFs and erroneously "thinks" that they get downloaded each time they are refrenced in a table when they are used for layout purposes. He eludes that you can have whole slews of these spacers and it will cause extra download time, which is far from the truth.

3.) Browser will read the table in multiple passes, first the structure and any defining attributes such as widths and heights. Widths and heights are not only derived from the table elements itself, but from elements within the table -- such as images. This is why it is good practice to define image dimensions so that the table layout will rendered correctly before the browser makes an actual call for that image.

This is where he "thinks" that the browser makes a second call to download the Html file again. Wrong. The element references for images and the text content are in client-side memory. The text will display instantly at that point. In other words, it does not affect download speed. The images (which would be downloaded anyway) are then called for and displayed at the correct position in the browser.

4.) CSS generally requires less code than cumbersome tables. Bunk. There is less code in the Html, but it is all transferred to a stylesheet. By his way of thinking, I could logically claim that stylesheets increase download times ... which we all know is bunk too.

One could argue that tables are less cumbersome than CSS postioning. The forums are full of hacks, quirks, and endless hours spent on this crap not rendering proplerly in this browser or that -- then it gets into the old "blame it on IE for not following the rules" line of crap. Hell people, if you want a fluid 3 column layout here is the code. It took me all but 30 seconds to type it in and is guaranteed to work in ALL browsers.

Code:
<table summary="Three column layout guide" align="center">
   <tr>
      <td width=120>Column One</td>
      <td width=510>Column Two</td>
      <td width=120>Column Three</td>
   </tr>
</table>
5.) CSS can control the order of when content appears on the screen. This is true. But lets think about this for one second. If you put your header into one table -- as soon as it is read and the browser notices the </table> and closes it ... it gets rendered and will appear on the screen. A couple of other tricks of the trade and you can have content appear above the fold while the other is still downloading in the background. This argument is somewhat a moot point in my opinion.

The rest of the article deals in normal specifics that everyone should at least adhere to. CSS for font styles, heading styles, etc. etc. is a good thing. The more of that crap you can take out of there and through into a stylesheet the better.

I would like to point out that they refer to it as a stylesheet, not a positionsheet or a style/positionsheet.

I would also like to personally challenge anyone here to effectively develop a template for this forum that you are looking at right now that is completely done in nothing but CSS positioning. It will also have to render exactly the same in all browsers. Drop me a PM when you have.

Now don't get me wrong. I use CSS as much as possible (for styling) with a minimal amount of positioning when it is not cumbersome to do so. The more I can get into the sheet the better. But I am not going to lose any sweat or sleep at night worrying about why a margin is protuding over the right side of my page and causing some Opera browser to have a horizontal scrollbar appear and start raggin on me about it.

At some point you just got to cut and run with the tables on intricate layouts. Those who are masochistic enough to toil away for three days on some solution, be my guest ... more power to you. But at the end of the day, all you really have done is gave yourself a pat on the back and a "job well done". My solution still looks the same and renders just as quickly as yours will -- and the viewer will not even know the difference.

If you want a good tool to analyze your page with to see some of the possible ways that you can optimize for download speeds, try http://www.websiteoptimization.com/services/analyze/

This is a sweet tool that will estimate your download times based on latencies due to numbers of packets sent via the transfer. It will identify "objects" (which is what they are) and assist you in building webpages that are built leaner in all facets of the page and its other elements.
Reply With Quote
  #4 (permalink)  
Old 07-12-2004, 01:26 AM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 453
HardCoded RepRank 0
Default

1) Conversely, if you are correct, shaving 1 byte could cut the download time in half :)

2) I don't see where the author states that he thinks that. Sure, a spacer gif can be reused all over the page after being downloaded once, but it still has to be downloaded.

3) He doesn't say the page needs to be downloaded again, he says the browser has to read the table twice. I'm not convinced that's true for all browsers, but I've read that elsewhere. And what if you have images that you don't know the size of before you're grabbing them...such as with some JavaScript banner code? In that case your page will definitely, concretely render faster if you can get those banners out of your main layout table. And while you're at it, get rid of the layout table.

4) Come on, there is demonstrably less code, markup and style included, in a CSS layout than in a table layout.

5) There are SEO considerations here too. When you have your typical table layout with the menu in the left column, the menu always has to come first.

In general I have to agree that making CSS layouts work properly is really stinkin hard. I don't do it all the time. But the rewards can be really, really substantial in some cases. And the more I do it the easier it seems to get.
Reply With Quote
  #5 (permalink)  
Old 07-12-2004, 12:16 PM
WebProWorld New Member
 

Join Date: Jul 2004
Location: Canada
Posts: 14
bloodwrath RepRank 0
Default

thanx guys for picking this article apart
so he has 10 points which one are legit or in your opinion are good ideas to implement.

im still a noob is this
so far these seem like good info..
2. Don't use images to display text
6. Minimise white space, line returns and comment tags
9. Put CSS and JavaScript into external documents
10. Use / at the end of directory links

the rest i dont know enough about to know what/if they would help.
__________________
Jason

Adware Spyware Removal - Scan your PC Absolutely FREE
http://www.supportcave.com/
Reply With Quote
  #6 (permalink)  
Old 07-12-2004, 12:22 PM
WebProWorld New Member
 

Join Date: Jul 2004
Location: Canada
Posts: 14
bloodwrath RepRank 0
Default

well i take back
point 10

Don't do this: <a href="http://www.URL.com/directoryname">

Do this instead: <a href="http://www.URL.com/directoryname/">

i did this any it killed my links
got 404 error.
so maybe not the best idea
__________________
Jason

Adware Spyware Removal - Scan your PC Absolutely FREE
http://www.supportcave.com/
Reply With Quote
  #7 (permalink)  
Old 07-12-2004, 12:45 PM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 453
HardCoded RepRank 0
Default

It sure shouldn't have. Give us an example.
Reply With Quote
  #8 (permalink)  
Old 07-12-2004, 01:25 PM
WebProWorld New Member
 

Join Date: Jul 2004
Location: Canada
Posts: 14
bloodwrath RepRank 0
Default

i misunderstood his point
directory links
i was making the below changes

my original link(s)
http://www.microsoft.com/security/protect/cd/order.asp
http://www.supportcave.com/Windows-N...val-Tools.html


my new link (s)
http://www.microsoft.com/security/protect/cd/order.asp/
http://www.supportcave.com/Windows-N...al-Tools.html/
__________________
Jason

Adware Spyware Removal - Scan your PC Absolutely FREE
http://www.supportcave.com/
Reply With Quote
  #9 (permalink)  
Old 07-12-2004, 04:59 PM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default

This forum I am developing uses a maximum of two tables per page (and one of them is for the calender).

There is nothing wrong with using tables as long as they are used for the correct purpose: displaying tabulated data.

My design uses CSS for all the design and tables for displaying tabulated data. The CSS file is over 20Kb at the moment but eventually when I move onto the PHP part this file will get split into smaller files for each page.

It looks worst in IE but that's only because it doesn't support the CSS equivalent of cellspacing="0".
Reply With Quote
  #10 (permalink)  
Old 07-12-2004, 05:46 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

Quote:
Originally Posted by splinter
There is nothing wrong with using tables as long as they are used for the correct purpose: displaying tabulated data.
Says who? There is nothing wrong with using tables for anything you wish to use them for. The W3C does not dictate what you can and cannot use tables for, the browser manufacturers and their lack of cooperation with each other in CSS postioning dictate what tables will be used for.

Quote:
Originally Posted by HardCoded
In general I have to agree that making CSS layouts work properly is really stinkin hard. I don't do it all the time. But the rewards can be really, really substantial in some cases.
To you maybe. But to the browser it could care less. To the visitor to your site, it could care less also. For me, I can care less and will use as much as I possibly can and let it lie at that. I do not particularly find that stressing over margins, floats, paddings, using ems over px all that rewarding -- but the Heart Surgeon at General Hospital might when I check in for a coronary.

Quote:
Originally Posted by HardCoded
3) He doesn't say the page needs to be downloaded again, he says the browser has to read the table twice.
What he said was that CSS has a faster download time than tables because and then cites one reason as the browser having to use a two-step parsing of the table. What I objected to is his slanted point of view here -- What does that have to do with downloading time???

Quote:
Originally Posted by HardCoded
1) Conversely, if you are correct, shaving 1 byte could cut the download time in half :)
Absolutely. Very observant!

You see there are ways to minimize a lot of code in the layout using tables. A lot of the styling of tables can be thrown into your stylesheets as well.

In my opinion, I thought the start of that whole article misleading and biased and then it went on about normal CSS styling which everyone should learn. Sure tables are bad when it comes to nesting and code bloat -- but a lot of it can be minimized with some easy to learn techniques.

Quote:
Originally Posted by splinter
This forum I am developing uses a maximum of two tables per page (and one of them is for the calender).
Your links to the topic views are broken splinter. You may want to look at it. That is the one area that I was interested in seeing how you managed it.

Let me know when you are pretty well along on this, Okay? Shoot me a PM, I would be interested in seeing your work.

You can see that even one table right now is one table too much, eh? I suggest on the the tables that make up the index list of forums/topics that you might try horizontal lists. I have a link for that somewhere if you are interested in it.
Reply With Quote
  #11 (permalink)  
Old 07-13-2004, 01:44 AM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 453
HardCoded RepRank 0
Default

Quote:
Originally Posted by splinter
It looks worst in IE but that's only because it doesn't support the CSS equivalent of cellspacing="0".
Nothing does, just give up on that and put it in your table tag. For now.
Reply With Quote
  #12 (permalink)  
Old 07-13-2004, 01:50 AM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 453
HardCoded RepRank 0
Default

ronnie, you're right. He confused rendering time with download time. Here's the exact quote for convenience:

Quote:
CSS has a faster download time than tables because:

Browsers read through tables twice before displaying their contents, once to work out their structure and once to determine their content
Reply With Quote
  #13 (permalink)  
Old 07-13-2004, 02:07 AM
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 453
HardCoded RepRank 0
Default

Quote:
Originally Posted by ronniethedodger
Quote:
Originally Posted by HardCoded
In general I have to agree that making CSS layouts work properly is really stinkin hard. I don't do it all the time. But the rewards can be really, really substantial in some cases.
To you maybe. But to the browser it could care less. To the visitor to your site, it could care less also. For me, I can care less and will use as much as I possibly can and let it lie at that. I do not particularly find that stressing over margins, floats, paddings, using ems over px all that rewarding -- but the Heart Surgeon at General Hospital might when I check in for a coronary.
Good god, don't be such a drama queen. There are some cases where using CSS layout over tables can be beneficial. I gave one such case earlier: you have a table column full of javascript banner ads. The whole table cannot render until the ads are down. Solutions: get rid of the ads, or put them in a separate div.

I invite comment on the comparison between my current version of parrysound.com, which depends almost entirely on tables to run, and the version I am about to launch, which uses CSS for the layout. Observant people will note two things: 1) the table version takes a long time before you get to see anything. 2) I had to scrap the footer in the CSS version, since, as is well known, tableless CSS layout still doesn't handle footers too well.
Reply With Quote
  #14 (permalink)  
Old 07-13-2004, 08:38 AM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default

Quote:
Originally Posted by HardCoded
Quote:
Originally Posted by splinter
It looks worst in IE but that's only because it doesn't support the CSS equivalent of cellspacing="0".
Nothing does, just give up on that and put it in your table tag. For now.
It looks fine in Opera, Mozilla, Firefox and Netscape.

Quote:
Originally Posted by HardCoded
as is well known, tableless CSS layout still doesn't handle footers too well.
I've managed it using a seperate <div id=''></div>.

Quote:
Originally Posted by ronniethedodger
There is nothing wrong with using tables for anything you wish to use them for. The W3C does not dictate what you can and cannot use tables for, the browser manufacturers and their lack of cooperation with each other in CSS postioning dictate what tables will be used for.
If you use CSS and apply it correctly a website will make complete sense to someone using a screen-reader. Using tables dictates the way in which the screen-reader will read out the page and this may cause confusion.

I refer you to this article.

Both CSS and table designs have their pluses and minuses. I just happen to believe that CSS has a lot more plusses than minuses whereas the same cannot be said of tables.

These are my opinions mind and I respect anyone elses views.
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0