[thelist] Cutting the fat from a page...help!
Judah McAuley
judah at wiredotter.com
Thu Aug 9 15:52:35 CDT 2001
At 01:42 PM 8/9/2001 -0700, John wrote:
> > http://www.proposalkit.com/info.htm
>
>There aren't all that many scripts on the page... it's setting a cookie and
>preloading all the images, that's where the bulk is.
>
>Have you considered stripping out those empty DIVs, though? That could
>help. If the HTML was still too large then unnesting those tables, removing
>some of the non-vital attributes, checking for nested FONT tags or bold
>images, these could be some ways of trimming down the markup.
>
>jd
I certainly agree with this. Take a look at the following from the page:
<tr>
<td colspan="3">
<div align="center"><font face="Arial, Helvetica, sans-serif"
size="2"><b><img src="img/screen3.gif" width="150" height="120"
align="left" hspace="0" vspace="0"></b></font>
<div align="left"><br>
</div>
<div align="left">
<p align="center"><font size="4" face="Arial, Helvetica,
sans-serif"><b>Professional
Proposal Kit 3.5</b></font><font size="2" face="Arial,
Helvetica, sans-serif"><br>
<i>Supports Win98/NT/ME/2000 & Mac. <br>
All tools easy to customize.</i></font></p>
</div>
</div>
</td>
</tr>
There is a font and a bold tag surrounding an image and a div tag
surrounding a line break. There is also a paragraph aligned center within
a div aligned left within a div aligned center. Unnecessary code all over
the place. I think that you're going to have to go through and start
sorting out your tables and div's and recode by hand. None of this code
(as far as I can tell) is completely *incorrect* (although the bold image
comes close), but it is bulky and confusing. That is one of the downside
to using a WYSIWYG editor.
Also, I noticed that you have a lot of repetition in your font tags. This
snippet, for example, has two instances of <font size="2" face="Arial,
Helvetica, sans-serif">. You could move all of your font tags into a style
sheet declare them as classes and then use the classes in your code. This
should cut out quite a bit of bulk in your code and improve readability to
boot.
Judah
More information about the thelist
mailing list