Extreme HTML Optimization: Manual or Automatic Optimization? | WebReference

Extreme HTML Optimization: Manual or Automatic Optimization?

123456789

Extreme HTML Optimization

Manual or Automatic Optimization?

An easy way to speed up your page display is to use an HTML optimization program. Programs like SpaceAgent, VSE Web Site Turbo, and WebOverdrive, all pretty much work the same way, removing excess spaces, tabs, returns, quotes, unnecessary attributes etc. Some even optimize JavaScript and style sheets, though they only remove excess spaces. I have yet to find a program that truly optimizes JavaScript (i.e., shortening variable and function names, etc.) as unlike HTML, JavaScript "tags" can be redefined at will.

Using these tools, entire sites or directories can be automatically optimized with drag-and-drop ease. Optimization is usually the last step in the production process, where the original unoptimized version is saved for later revisions. It would be nice if we could integrate one of these optimizers into an FTP program, perhaps with a client scripting mechanism (Applescript etc.).

Automatic optimization can only go so far. For maximum control you need to do it by hand. First, rethink what elements are absolutely necessary. The idea is to get the first screen to the user as fast as possible.

Optimizer

We created a simple optimizer script to clean up extra spaces and comments (non-SSI comments that is). We run this script as the last step in our CRON that build the home page. This script is available as open source.

HTML Compression

Using something like mod_gzip you can automatically compress your HTML on the fly for 40% less bandwidth and a dramatic speedup in page display. Browser upzip HTML automatically on the fly, saving time. There are also programs that compress HTML on the fly or statically using JavaScript etc.

123456789

http://www.internet.com
Comments are welcome
Created: Jan. 10, 2000
Revised: Mar. 16, 2001
URL: http://webreference.com/authoring/languages/html/optimize/part2.html