Jeremy Keith (10 Oct 2005)
For me, I think graceful degradation is the most important factor. What that boils down to is that a good script shouldn’t make any assumptions about its environment. Instead, it should investigate the terrain and carry out tasks only when the browser or document are capable of executing the instructions. The obvious example is object detection. Instead of assuming that the browser understands a method you’re going to use, like document.getElementById, you test for its existence before doing anything else in your script. The same approach applies to the document itself. Don’t assume that an element with a certain id exists-check for its existence before trying to manipulate it.
Article URL: http://www.digital-web.com/articles/jeremy_keith/
Read 330 more articles from Digital Web sorted by
Next Article: Never Get Involved in a Land War in Asia (or Build a Website for No Reason)