|
WebWord Weblog Posting Posting Date: March 19, 2003 Optimising your website design -- "I'm an efficiency nut." (Comments: This is an interview with Andy King. Web Site Optimization)
Reader Comments...
One of his suggestions is to remove "comments and white space" from the HTML code. Surely this would only serve to make the code less maintainable in future? All good coders I've known stress the importance of properly commented code. Posted by: Alan Fisher on March 20, 2003 10:21 AM
Yes, well he also tells you to minimize your prose. Andy seems to be suffering from a problem similar to Nielsen: Decent ideas that are getting distilled a little too close to dogma to make practical sense anymore. But they make for some goooood quoting. The book site doesn't seem to eat it's own dog food, incidentally. As a side-note, I thought stylesheets were cached(just ask any Mac/IE user) so isn't CSS sub-optimal, and also damaging to your content:code ratio? Posted by: Su on March 20, 2003 11:48 AM
Oops.
Careful use of DHTML can speed up a site (as the .js file gets cached, and you can give immediate feedback), and CSS common to multiple pages should be put in external files; I think the "Be especially wary of multiple .js and .css files" comment was aimed at sites that load far too many external files. For example, some sites will have a JavaScript file for an ad banner, another for tracking, another few for a ready-made DHTML library, a dropdown menu script (many of which are enormous), and so on. Obviously you want to break things into sensible chunks, but it's a balance against optimisation. As for removing comments and white space, well it's helpful to have tidy-looking source code, but HTML is no place for developers to put their documentation. Comments, apart from those used for diagnostics, can be put into server-side scripting and not sent to the browser. ColdFusion in particular can generate vast quantities of white space if used without care. CSS layout usually speeds sites up immensely, both in terms of perceived speed and actual overall download time. Even if you're only concerned with broadband users, it's always good to reduce your bandwidth bill and save users a little bit of time.
Removing white space from code isn't a problem for those of us who use a web design program that does it for us on-the-fly. Page on web server: super small. Page on hard drive: bloated with space. Posted by: Calcium Disodium EDTA on March 20, 2003 06:40 PM
Home | Moving WebWord | Cool Books | Hot Web Sites
URL: http://webword.com/weblog/ ©1998-2005 by WebWord.com. All rights reserved. |