Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
lisajoy
Joined: Feb 20, 2004
# Posts: 13
|
Posted: 2004-Apr-03 02:58
I need to reduce the size of my html to optimize site load time. Any online references that tell you which html elements use of the most space? I would assume tables use a lot of bandwidth - and I guess what I am looking for is something that can tell me if nested tables are better or several small tables .. etc. thanks.
|
 |
crash
Staff
Joined: Dec 02, 2003
# Posts: 10626
|
Posted: 2004-Apr-03 17:13
You need to look at your source, it's characters used to make the page. There really isn't anything that tells you what html elements use the most space. It doesn't work that way.
Switching from nested tables to several small tables probably won't do much to reduce your file size as you will probably be using basically the same amount of tables to retain the look.
Are you using CSS for your text styles? You can usually reduce a file quite a bit by converting to CSS if you have not already by eliminating all your font tags. You can also link to an off page CSS file instead of having the style definitions on the page further reducing the page size.
On page javascript should be moved to a seperate file and linked as well, if you have it, this can seriously reduce the file size as well.
Other than that you need to look at your source and see what can be adjusted layout wise.
If your concern is bandwidth usage you need to look at your images as well, if they are not optimized for the web then that could be a problem.
If you have an image that is 200x200 but you are resizing with html on the page to be 100x100 you are still loading a 200x200 size image, reduce or crop it so it's 100x100 (the size you want to display) instead. Use an image editor to optimize the image file as well. Fireworks and Photoshop both contain good image optimizers.
|
 |
g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465
|
Posted: 2004-Apr-03 17:31
[w3] w3
Get all of the CSS and javascript code out into external files.
Get rid of all <font> tags and use CSS instead.
Run your pages through http://validator.w3.org/detailed.html and correct all errors found.
Most people forget all about this one:
Remove ALL whitespace from the RIGHT side of all the lines of HTML code. You'll usually find lots that has crept into the code. You can see it all if you highlight all the source code text in a text editor.
<p>Make sure that you put your content in paragraphs rather than using multiple line-break characters to space things out.</p>
Optimise the image sizes, resolution, colour-depth, and the file size. Note that GIF is best for some types of image, and JPG for others. Experiment.
|
 |
Burko
Joined: Dec 08, 2003
# Posts: 83
|
Posted: 2004-Apr-05 18:27
Heck, the -best- way to optimize some images is to remove them entirely. If you're using images to display text in nifty formats, see if you can't remove that image and use CSS to place, format, and style the text as you would.
Don't ever allow FrontPage or any other MS product to touch your source code; FrontPage and Word will rewrite your source and drop so much useless code into it.
Files of text, such as html, css, and js files, will never (reasonably) be as large as an image file, such as a jpeg or a gif. Unless your pages have increadible amounts of text, those files will transfere rather quickly over even slower connections while it's those images that slow the works.
|
 |
balvord
Joined: May 23, 2002
# Posts: 21
|
Posted: 2004-Apr-14 19:41
The best way to really cut down a ton of file size is to build your site using CSS instead of tables for layout. In my experience, a page done with CSS layout tends to be 50% the file size that the same page built with tables would be.
Of course, learning to build sites with CSS layout is no trivial matter. But it's definitely the way to go.
|
 |
JQ
Staff
Joined: Mar 11, 2001
# Posts: 2765
|
Posted: 2004-Apr-14 21:01
Too many nested tables can really affect load time... something to do with how the browser reads them. As in you'll stare at a blank page for what seems like an eternity (well, at least on a dialup) and then the page suddenly "pops" up.
There's a little free program out there called HTML Tidy that will strip out any extraneous code, like the proprietary garbage some WYSIWYGs generate. It comes in various flavors for different platforms.
EDIT: can't seem to get the url tag to work right
w3: http://www.w3.org/People/Raggett/tidy/
[edited to fix url -JimBot]
[ Message was edited by: JimBot 04/14/2004 01:49 pm ]
|
 |
emi_b
Joined: Nov 21, 2003
# Posts: 347
|
Posted: 2004-Apr-14 21:39
I was recently given a page that was table based and had font tags every where. Without touching the content, I was able to reduce the file size by 40K, by just removing the fonat tags and table crap. That's alot of wasted info. The file size wnet from being 110k, to being 70k. I can't recommend CSS enough.
As for browsers problems with nested tables. A browser has to read through a table twice beofre it will displays it. So if you have a table inside another table inside a table. THe browser is erading your page 6 times, before it will display anything.
|
 |
lisajoy
Joined: Feb 20, 2004
# Posts: 13
|
Posted: 2004-Apr-15 07:23
Are there any issues with CSS? Can all browser render it properly? thanks.
|
 |
emi_b
Joined: Nov 21, 2003
# Posts: 347
|
Posted: 2004-Apr-15 14:31
Not all browsers. But most can. Forget NN4.7, it just can't do it, anything after that is good, but you still need to check to make sure that everything works across all of your taget browsers.
|
 |
g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465
|
Posted: 2004-Apr-15 21:16
I use @import rather than <link> for the CSS files, then the CSS is completely hidden from all older browsers.
Old browsers get completely unstyled content, but it loads really fast for them.
|
 |
thomkilroy
Joined: Jan 13, 2004
# Posts: 46
|
Posted: 2004-Apr-28 06:15
Here is an online code cleaner for FP. It can only do one page at a time, and your page has to be online-accessible, but it's free and it works (at least as far as I have used it, it does).
http://www.webmaster-toolkit.com/frontpage-code-cleaner.shtml
|
 |
g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465
|
Posted: 2004-Apr-28 21:44
Always make a BACKUP copy of your pages BEFORE you start running them through a tool such as this, just in case it messes things up.
Additionally, take each final page that it produces, and run it through http://validator.w3.org/detailed.html and correct any remaining problems found.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|