Working with Browsers
- Never use browser detection
-
- you may know which popular browsers will or will not support your script
- however, what about obscure browsers or future browsers
- your script may generate error messages or won't be called by a browser that could handle it
- Always use object detection
-
- to support DHTML a browser needs to support one of the advanced DOMs
- you need to test for which of the 3 DOMs that the browser supports
- then you need to use the correct code for that specif DOM