Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Detect-and-route with JavaScript

By Molly E. Holzschlag
2005-03-31


The rock-bottom lowest-common-denominator

As you study your audience statistics, you may find that some people you want to reach don't have JavaScript. They may be turning off JavaScript or using browsers that don't support it. Only about 3% of the total population of Web audiences don't use JavaScript, but it's an issue to keep your eye on. Of course, if it's essential to serve those users, you'll probably be designing alternative access pages for them, as that 3% probably can't process high-end pages anyway.

Once you've clarified the site intent and audience and made your basic design decisions, you can turn your mind to what kind of detect-and-route scripts you'll need. For instance:

• Does your site design used fixed tables to hold design elements securely and specifically in place? In that case a resolution-detect script will be very helpful for you.
• If you're making extensive use of cascading style sheets (CSS) and dynamic HTML, routing by browser will help your audience members enjoy your site -- no matter what browser they're using.
• When you're interested in delivering strict HTML 4.0 or browser-specific technologies such as ActiveX components, browser detect-and-route is invaluable.
• Browser detects can help ensure that site visitors who don't have a necessary plug-in can be sent to a page without the technology that requires it -- or to a page where information on the plug-in is available.

Once you know what scripts you need, you decide whether to write your own or to adapt existing scripts (see Resources).

Tutorial Pages:
» Keep users happy by using savvy scripts
» Serving user needs
» Planning ahead
» The rock-bottom lowest-common-denominator
» Route for technology, not content
» Finding scripts or rolling your own
» Detecting the details
» Routing by browser type
» Matching pages to display resolution
» Testing your scripts
» Summing up
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Striped Tables Using JavaScript
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» How to Setup a Randomising Function