Home arrow DHTML arrow Cross-browser Functionality with Branching

Cross-browser Functionality with Branching

There are several methods of ensuring cross-browser functionality with at the major browser vendors. Explore what the userAgent object can do. Included are code samples for determing what browsers visitors to your sites are using.

Author Info:
By: Dan Wellman
Rating: 4 stars4 stars4 stars4 stars4 stars / 8
October 05, 2004
  1. · Cross-browser Functionality with Branching
  2. · Identify the Browsers Your Visitors Use
  3. · Test Browser and Re-direct Visitor

print this article

Cross-browser Functionality with Branching
(Page 1 of 3 )

The invention of DHTML has led to a proliferation of easily coded, impressive web pages containing animation and client-side effects. DHTML is easily learnt by building upon a foundation of previously acquired HTML knowledge and it's easily implemented, after all, it's merely a combination of HTML, CSS - a scripting language of choice - and the DOM, or Document Object Model, which is a representation of all of the elements that make up the web page and makes the elements on a page visible to any scripts involved.

This is where the problems start however - with the DOM. Really, it is wrong to say 'the' DOM because in actual fact, each browser has its own implementation of the DOM. So really it's a problem with a DOM, the problem normally being that you've created a blindingly brilliant web site that only one specific browser can access properly. This is a problem that is almost as old as the Internet itself, but fortunately, it is a problem that can be overcome.

There are several methods of ensuring cross-browser functionality with at least the major browser vendors, Microsoft and Netscape. Unfortunately, with the current HTML/DHTML language specifications and browser competitiveness, you're never going to achieve full browser compatibility with all known browsers, but you can at least achieve it with the most popular ones.

Interestingly enough, according to recent figures published by the W3Schools site indicate that currently, the browser market is almost completely dominated by Microsoft’s Internet Explorer; a whopping 71% of visitors to the W3Schools site in August 2004 used Internet Explorer, and while this is only a statistic, and has only captured visitors to one site.

If viewed as an average cross-section of the Internet population in general, it shows that most people browsing the Internet are doing so with a browser that understands JavaScript, VBScript and CSS, and has support for things like XML and XSLT – which is very good news if you’re a developer. Unfortunately, this still leaves a possible 30% of surfers using a different browser which has been broken down by the W3Schools site as: 2.3% using Opera, 15.5% using Mozilla and 2% using Netscape. This leaves a further 11.2% of people using something else. So you can see that browser use is still fairly diverse.

blog comments powered by Disqus

- Text-Justify, Volume, and Other Style Sheet ...
- Ruby-Position, Size, and Other Style Sheet P...
- Padding, Pages, and More Style Sheet Propert...
- Marks, Orphans, and More Style Sheet Propert...
- Layouts, Margins, and Other Style Sheet Prop...
- Floats, Fonts, and Other Style Sheet Propert...
- Color, Filters, and Other Style Sheet Proper...
- Borders and More with Style Sheets
- Learning Style Sheet Properties
- Style Sheet Property Reference
- Completing a Noisy Image Application
- An Object-Based Approach to Building Noisy I...
- A Basic Method for Building Noisy Images
- Adding More Features to Sliders with the Scr...
- Using Sliders with the Scriptaculous Framewo...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials