Extreme HTML Optimization: Minimize the HEAD
|
Extreme HTML Optimization
Minimize the HEAD
Browser interact with servers in discrete-sized packets. By minimizing the size of your page's HEAD, you can speed your content's initial display. The HEAD must be parsed before the rest of the page is rendered.
Conditional META Tags
To make the search engine spiders happy, while saving space for browsers visiting your site, you can use conditional SSI META tags. We adopted this approach on WebRef's home page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>The Webmaster's Reference Library - Web Authoring Tips & Tutorials for Developers</TITLE>
<!--#if expr="$HTTP_USER_AGENT = /^Mozilla/" --><!--#else -->
<META Name="keywords" Content="authoring web development web
design java script graphic design html tutorials javascript dynamic html
tutorial authoring tools free computer software web developers web page design
internet marketing dhtml xml site designer webmaster resource programming
reviews frames cgi perl open source scripts">
<META Name="description" Content="The definitive guide to web
development with tutorials on all aspects of web design and authoring. With
free computer software in java script, dynamic html and perl, plus free
web-based authoring tools.">
<!--#endif -->
...
</HEAD>
Note if the server detects a "Mozilla" browser (Netscape, IE, or Opera in default mode) it displays no META tags, otherwise it does. Sharp-eyed readers will also note that these meta tags are too long. Try and limit yourself to 200 characters for meta tags. We recently removed the conditional SSI meta tags on the home page as websitegarage.com complains if we don't include them.
Line Length
Browsers seem to like lines of 255 characters or less. Also, some HTML e-mail programs raise an overflow virus warning flag if your lines are too long, so it's best to stick with 200 characters or less for your META tags, and 255 for lines of HTML code.
There's no need to use commas to separate keywords, just use spaces as search engines ignore the commas.
|
Revised: Mar. 19, 2001