473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How many browsers must we support?

Hi, as the subject says
How many browsers must we support?
How many are there exactly?

When I run this JavaScript in Firefox and IE6:

function init(){
if(document.getElementById)
alert("W3C DOM Supported");
else if(document.all)
alert("MSIE 4 DOM Supported");
else if(document.layers)
alert("NN 4 DOM Supported");
else
alert("This is a really old browser");
}

Both IE6 and Firefox report "W3C DOM Supported"
This being the case .. surely we can cover 95% of the market by coding for
the W3C DOM
I wonder if Opera supports the W3C DOM?

thanks for your thoughts on this
cw
Jul 23 '05 #1
12 1673
On Mon, 21 Feb 2005 02:24:31 -0000, "code_wrong" <ta*@tac.ouch.co.uk>
wrote:
How many browsers must we support?
All of them
How many are there exactly?
hundreds
This being the case .. surely we can cover 95% of the market by coding for
the W3C DOM


There's absolutely no point using document.layers and no point using
document.all that doesn't mean however that the "W3C DOM is supported"
(whatever that means anyway) The most important situation is no or
unpredictable javascript support at all, these need to be catered for
by falling back gracefully when the js doesn't run - this has the
added benefit of also falling back in those really old browsers.

Jim.
Jul 23 '05 #2
Jim Ley wrote:
How many browsers must we support?

All of them


That's certainly a debateable point ;)

--
Matt Kruse
http://www.JavascriptToolbox.com
Jul 23 '05 #3
On Sun, 20 Feb 2005 21:15:23 -0600, "Matt Kruse"
<ne********@mattkruse.com> wrote:
Jim Ley wrote:
How many browsers must we support?

All of them


That's certainly a debateable point ;)


Sure, but from my side it depends on what you mean by support,
supporting for me is all the content understandable, navigatable away
not randomly causing script errors to appear. And even that last one
I'm prepared to negotiate for compile time errors alone.

Cheers,

Jim.
Jul 23 '05 #4

"Jim Ley" <ji*@jibbering.com> wrote in message
news:42*****************@news.individual.net...
On Mon, 21 Feb 2005 02:24:31 -0000, "code_wrong" <ta*@tac.ouch.co.uk>
wrote:
How many browsers must we support?


All of them
How many are there exactly?


hundreds
This being the case .. surely we can cover 95% of the market by coding for
the W3C DOM


There's absolutely no point using document.layers and no point using
document.all that doesn't mean however that the "W3C DOM is supported"
(whatever that means anyway) The most important situation is no or
unpredictable javascript support at all, these need to be catered for
by falling back gracefully when the js doesn't run - this has the
added benefit of also falling back in those really old browsers.


I don't understand .. there is no point in checking which DOM the browser
supports even though different code will apply to each?
Jul 23 '05 #5
On Mon, 21 Feb 2005 code_wrong <ta*@tac.ouch.co.uk> wrote:
Hi, as the subject says
How many browsers must we support?


depends how much of the internet population you envisage using your
site.

If it's a major site, then support all browsers.

If only small, make sure you support IE, Netscape and Mozilla (Firefox)

--

"I hear ma train a comin'
.... hear freedom comin"
Jul 23 '05 #6
code_wrong wrote:
[T]here is no point in checking which DOM the browser
supports even though different code will apply to each?


Your "tests" do little in determining what object model is supported
by a particular user agent. For example, IE will evaluate
document.getElementById as true, but it doesn't provide a complete (or
even correct) W3C DOM implementation. Similarly, Opera (among others)
would evaluate document.all as true (if it were allowed to reach that
branch), but it doesn't completely implement Microsoft's proprietary
object model.

You cannot reliably infer the entire model from one brief test. In
fact, you shouldn't necessarily infer support from a number of tests
unless the methods or properties to be used are part of the same
feature set and are closely related. What you should do it test what
you are going to use.

If you want to check that document.getElementsByTagName is supported,
how does evaluating document.getElementById achieve that? The clear
answer is that it doesn't.

See Browser Detecting (and what to do instead)[1] in the FAQ notes for
more information.

Mike
[1]<URL:http://www.jibbering.com/faq/faq_notes/not_browser_detect.html#bdTop>

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #7
code_wrong wrote:
[T]here is no point in checking which DOM the browser
supports even though different code will apply to each?


Your "tests" do little in determining what object model is supported
by a particular user agent. For example, IE will evaluate
document.getElementById as true, but it doesn't provide a complete (or
even correct) W3C DOM implementation. Similarly, Opera (among others)
would evaluate document.all as true (if it were allowed to reach that
branch), but it doesn't completely implement Microsoft's proprietary
object model.

You cannot reliably infer the entire model from one brief test. In
fact, you shouldn't necessarily infer support from a number of tests
unless the methods or properties to be used are part of the same
feature set and are closely related. What you should do is test for
what you are going to use.

If you want to check that document.getElementsByTagName is supported,
how does evaluating document.getElementById achieve that? The clear
answer is that it doesn't.

See Browser Detecting (and what to do instead)[1] in the FAQ notes for
more information.

Mike
[1]<URL:http://www.jibbering.com/faq/faq_notes/not_browser_detect.html#bdTop>

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #8
In article <11****************@lotis.uk.clara.net>, ta*@tac.ouch.co.uk
enlightened us with...

I don't understand .. there is no point in checking which DOM the browser
supports even though different code will apply to each?


Not really.
Check for object support, not DOM support.
For example, older versions of Opera will pass a test for
if (document.getElementById)
but they did not properly support
document.getElementById("id").style

If you want your code to not kill browsers you weren't expecting, do a test
before ANY usage of a particular element, function, method, etc.
It may not "work", so to speak, in older browsers, but at least it won't
crash them.
Your site should not DEPEND on script if the goal is to "support" all
browsers ("support" meaning that people can use the site, navigate, etc, not
that it will necessarily look gorgeous in them all).

Example: my cat site uses javascript to do random text in a div. It works in
IE5+, Netscape 6+, Mozilla, Firefox, and Opera 7+. It may work in others. But
for older browsers (or script-disabled) that don't support
document.getElementByID or domElement.innerHTML, they just all see the same
text (no rotation, but no crashing either).

--
--
~kaeli~
The secret of the universe is @*&^^^ NO CARRIER
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #9
code_wrong wrote:
Hi, as the subject says
How many browsers must we support?
And it is a strangely worded question. It is probably the result of
reading too many technical documents but 'must', to me, implies
compulsion. You don't have to support any web browsers at all. You
could, for example, make up your own mark-up language and serve then as
content from a 'web site' (with suitable content-type headers), if you
really wanted to. And all of the web browsers out there would reliably
fail to display anything (but maybe the option to safe the content to
disk). Obviously that would be an utter waste of time and effort, doing
nobody any good at all, but (given access to s suitable public server)
nobody can stop you.

Compulsion, the definition of what you really must do, comes in the form
of legal contracts and technical specifications. If the contract or
specifications say something must be done then it really must. However,
contracts and specifications are supposed to be given a very literal
interpretation so consider what is really being demanded of a
requirement to support exclusively Windows IE 6 (unqualified), for
example. IE 6 is a user configurable web browsers, various features can
be turned on and off. Authoring for all of the permutations that are
possible on just that one piece of software (including its various
releases, service packs and security patches) is no trivial activity in
itself.

Consider; ActiveX may be enabled or disabled (increasingly disabled
these days), user style sheets may be in use or not, default fonts,
their sizes and color, the dimensions, placement and presence of window
chrome, etc, are all under user control, and ultimately scripting may be
disabled itself. And that is a long way from being an exclusive list of
the possibilities offered by just one browser version on one OS.

Thus, unqualified, a specified requirement to support (only) Windows IE
6 is a requirement to design for a range of possibilities that goes as
far as the total failure of any and all scripts to execute at all. And
so long as the mark-up used avoids too much Microsoft bias and the
scripts feature detect the variability in IE 6's support for them with a
close relationship to the features actually employed, such a design
would have, almost accidentally, also covered the vast majority of other
browsers, because IE 6 not executing scripts should not be significantly
different form any other browser not executing scripts (that is, they
can all just show the underlying HTML).

Of course specifications can be much more heavily qualified. Currently I
am working on a web application, but it is not a public web application,
it is a browser-based alternative client for an existing desktop
client-server application, and is being written to allow the customers
to use their application remotely (from their own servers). The
customers don't want to be subject to any (desktop) OS restrictions and
to achieve that our specification calls for us to support Windows IE 6
and Gecko browsers. We further specify that these browsers will be
javascript capable and (in the case of IE) have ActiveX enabled (because
of the heavy use of web services/SOAP).

The most heavily qualified browser specifications come with Intranet
applications, where it is (sometimes) possible to know exactly what
browsers are in use and exactly how they are configured (at least to the
extent that the administrators elect to impose a specific
configuration).

The appropriateness of more restrictive specifications here is directly
related to the degree to which the use of the end product can be
restricted. Consider someone commissioning a public e-commerce web site,
and naively specifying support of IE browsers (maybe believing the
statistics and assuming that represented an acceptable market share),
and the web developing agents (not being able to design for the possible
permutations of IE) coming back and proposing some more restrictive
criteria, say "default installations/configurations of scrip enabled
IE". That individual may be astute enough to perceive their market share
trickling away with every additional qualification to their
specification.

On the other hand specifications of browsers/versions and configurations
may be considered the minimum standard for a project. Our QA department
needs those criteria so they have something to test against, and without
them it would not be possible to ever declare the project finished. But
I am fairly confident that the end result will actually work on any
(reasonably W3C DOM compliant) script enabled dynamic visual browser
that supports scripting and XMLHTTP requests. Not as a result of any
extra effort to achieve that but just because there was no reason to
write the scripts such that they wouldn't.
How many are there exactly?
More than are known by any individual.
When I run this JavaScript in Firefox and IE6:

function init(){
if(document.getElementById)
alert("W3C DOM Supported");
else if(document.all)
alert("MSIE 4 DOM Supported");
else if(document.layers)
alert("NN 4 DOM Supported");
else
alert("This is a really old browser");
}

Both IE6 and Firefox report "W3C DOM Supported"
As will Opera form about version 5, NetFront/Web Browser, IceBrowser 5+,
Konqueror, Safari and many others, but their W3C support (and
particularly support for dynamic DOM features) varies enormously.
This being the case .. surely we can cover 95% of the
market by coding for the W3C DOM
Maybe (though 5%, if accurate, of the Internet is more than the entire
population of some countries), but we _can_ cover 100% of the market by
designing for the consequences of script failure (clean degradation) and
applying suitable feature detection so our scripts can know when it is
time to degrade. And, as every scriptable browser offers the user the
option of disabling scripting, designing for any one browser (in a
public Internet context) should encompass designing for total script
failure anyway.
I wonder if Opera supports the W3C DOM?
It shouldn't be too difficult to find out, you can download the
Advertising sponsored version of Opera for free (and it isn't even that
big).
thanks for your thoughts on this


To achieve clean degradation the underlying HTML needs to be viable in
itself. It must contain all of the content that the viewer needs access
to, and be capable of being navigated/effectively used. From that
starting point it is possible to layer the most extreme scripted
manipulations of that HTML over the top, and achieve virtually any
desired goal, in a way that enhances the web page without getting in the
way of the viability of the underlying HTML. Achieving this takes
knowledge, experience and (above all) thought.

In practice very little scripting in the wild even comes close to
achieving this; scripts, often as not, become the barrier to the
viability of web pages. And that unfortunate truth promotes an attitude
against scripted web pages.

There are still livings to be made in the creation of such scripts. In
the end it is up to you; you can learn how to accommodate 100% of web
browsers in script design, or you can dismiss the issues and comply only
with what must be done by specification. Though the former makes the
latter much easier, but takes more initial study, and some personal
integrity.

Richard.
Jul 23 '05 #10
JRS: In article <sl****************@carbon.redbrick.dcu.ie>, dated Mon,
21 Feb 2005 13:18:09, seen in news:comp.lang.javascript, Stimp
<re*@spumco.com> posted :
On Mon, 21 Feb 2005 code_wrong <ta*@tac.ouch.co.uk> wrote:
Hi, as the subject says
How many browsers must we support?


depends how much of the internet population you envisage using your
site.

If it's a major site, then support all browsers.

If only small, make sure you support IE, Netscape and Mozilla (Firefox)


If the site provides a service to the public, then ensure that you
support the browsers that the disabled use; that is a moral requirement,
and increasingly often a legal one.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #11
BG
The lack of standards with this shit is incredible.

The best thing to do - is test the code for the most common browser which is
IE. Make sure it works there.

If it doesn't work in one of the dozens of other non-standards based
browsers - just put a blurb on your main page

"This site will not work with ......."

Until there are standards it's pointless trying to support everybody
"Richard Cornford" <Ri*****@litotes.demon.co.uk> wrote in message
news:cv*******************@news.demon.co.uk...
code_wrong wrote:
Hi, as the subject says
How many browsers must we support?


And it is a strangely worded question. It is probably the result of
reading too many technical documents but 'must', to me, implies
compulsion. You don't have to support any web browsers at all. You
could, for example, make up your own mark-up language and serve then as
content from a 'web site' (with suitable content-type headers), if you
really wanted to. And all of the web browsers out there would reliably
fail to display anything (but maybe the option to safe the content to
disk). Obviously that would be an utter waste of time and effort, doing
nobody any good at all, but (given access to s suitable public server)
nobody can stop you.

Compulsion, the definition of what you really must do, comes in the form
of legal contracts and technical specifications. If the contract or
specifications say something must be done then it really must. However,
contracts and specifications are supposed to be given a very literal
interpretation so consider what is really being demanded of a
requirement to support exclusively Windows IE 6 (unqualified), for
example. IE 6 is a user configurable web browsers, various features can
be turned on and off. Authoring for all of the permutations that are
possible on just that one piece of software (including its various
releases, service packs and security patches) is no trivial activity in
itself.

Consider; ActiveX may be enabled or disabled (increasingly disabled
these days), user style sheets may be in use or not, default fonts,
their sizes and color, the dimensions, placement and presence of window
chrome, etc, are all under user control, and ultimately scripting may be
disabled itself. And that is a long way from being an exclusive list of
the possibilities offered by just one browser version on one OS.

Thus, unqualified, a specified requirement to support (only) Windows IE
6 is a requirement to design for a range of possibilities that goes as
far as the total failure of any and all scripts to execute at all. And
so long as the mark-up used avoids too much Microsoft bias and the
scripts feature detect the variability in IE 6's support for them with a
close relationship to the features actually employed, such a design
would have, almost accidentally, also covered the vast majority of other
browsers, because IE 6 not executing scripts should not be significantly
different form any other browser not executing scripts (that is, they
can all just show the underlying HTML).

Of course specifications can be much more heavily qualified. Currently I
am working on a web application, but it is not a public web application,
it is a browser-based alternative client for an existing desktop
client-server application, and is being written to allow the customers
to use their application remotely (from their own servers). The
customers don't want to be subject to any (desktop) OS restrictions and
to achieve that our specification calls for us to support Windows IE 6
and Gecko browsers. We further specify that these browsers will be
javascript capable and (in the case of IE) have ActiveX enabled (because
of the heavy use of web services/SOAP).

The most heavily qualified browser specifications come with Intranet
applications, where it is (sometimes) possible to know exactly what
browsers are in use and exactly how they are configured (at least to the
extent that the administrators elect to impose a specific
configuration).

The appropriateness of more restrictive specifications here is directly
related to the degree to which the use of the end product can be
restricted. Consider someone commissioning a public e-commerce web site,
and naively specifying support of IE browsers (maybe believing the
statistics and assuming that represented an acceptable market share),
and the web developing agents (not being able to design for the possible
permutations of IE) coming back and proposing some more restrictive
criteria, say "default installations/configurations of scrip enabled
IE". That individual may be astute enough to perceive their market share
trickling away with every additional qualification to their
specification.

On the other hand specifications of browsers/versions and configurations
may be considered the minimum standard for a project. Our QA department
needs those criteria so they have something to test against, and without
them it would not be possible to ever declare the project finished. But
I am fairly confident that the end result will actually work on any
(reasonably W3C DOM compliant) script enabled dynamic visual browser
that supports scripting and XMLHTTP requests. Not as a result of any
extra effort to achieve that but just because there was no reason to
write the scripts such that they wouldn't.
How many are there exactly?


More than are known by any individual.
When I run this JavaScript in Firefox and IE6:

function init(){
if(document.getElementById)
alert("W3C DOM Supported");
else if(document.all)
alert("MSIE 4 DOM Supported");
else if(document.layers)
alert("NN 4 DOM Supported");
else
alert("This is a really old browser");
}

Both IE6 and Firefox report "W3C DOM Supported"


As will Opera form about version 5, NetFront/Web Browser, IceBrowser 5+,
Konqueror, Safari and many others, but their W3C support (and
particularly support for dynamic DOM features) varies enormously.
This being the case .. surely we can cover 95% of the
market by coding for the W3C DOM


Maybe (though 5%, if accurate, of the Internet is more than the entire
population of some countries), but we _can_ cover 100% of the market by
designing for the consequences of script failure (clean degradation) and
applying suitable feature detection so our scripts can know when it is
time to degrade. And, as every scriptable browser offers the user the
option of disabling scripting, designing for any one browser (in a
public Internet context) should encompass designing for total script
failure anyway.
I wonder if Opera supports the W3C DOM?


It shouldn't be too difficult to find out, you can download the
Advertising sponsored version of Opera for free (and it isn't even that
big).
thanks for your thoughts on this


To achieve clean degradation the underlying HTML needs to be viable in
itself. It must contain all of the content that the viewer needs access
to, and be capable of being navigated/effectively used. From that
starting point it is possible to layer the most extreme scripted
manipulations of that HTML over the top, and achieve virtually any
desired goal, in a way that enhances the web page without getting in the
way of the viability of the underlying HTML. Achieving this takes
knowledge, experience and (above all) thought.

In practice very little scripting in the wild even comes close to
achieving this; scripts, often as not, become the barrier to the
viability of web pages. And that unfortunate truth promotes an attitude
against scripted web pages.

There are still livings to be made in the creation of such scripts. In
the end it is up to you; you can learn how to accommodate 100% of web
browsers in script design, or you can dismiss the issues and comply only
with what must be done by specification. Though the former makes the
latter much easier, but takes more initial study, and some personal
integrity.

Richard.

Jul 23 '05 #12
On Tue, 22 Feb 2005 03:55:11 -0500, BG wrote:
The lack of standards with this shit is incredible.

The best thing to do - is test the code for the most common browser
which is IE. Make sure it works there.
Yea, make sure it works in the browser responsible for forking the
language.
If it doesn't work in one of the dozens of other non-standards based
browsers - just put a blurb on your main page
IE is the only non-standards browser (only being a somewhat relative term
here).
"This site will not work with ......."

Until there are standards it's pointless trying to support everybody


Don't design your scripts around functions that don't work in geko
browsers and your page will work in 90% of browsers.

--
Life is short, but wide. -KV

Jul 23 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: johkar | last post by:
I only have IE 6 and dial-up. Can you help me determine which browsers support this code? Thanks, John <html> <head> <title>Fixed Table Headers</title> <script language="JavaScript"...
14
by: Terry A. Haimann | last post by:
I have been working on creating a dynamic web page and have made slow but steady progress. What I have now has an opening page with two drop down boxes. Based on a choice from the first box, the...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
12
by: confused | last post by:
After expressing my interest in expanding my new knowledge of HTML and CSS into the wild realm of JavaScript, I was advised that it is wiser to avoid it, since not all browsers are use it or are...
6
by: TJ | last post by:
Hello All, I posted a question a few days ago entitled "Select element with no selected options". Over the course of the discussion, RobG wrote: > This is just an example, it is not really...
6
by: Richie | last post by:
I went through the past six months or so of entries in c.l.javascript, and found a couple where people had expressed opinions about the value of supporting much older versions of Netscape and IE. ...
12
by: George Cox | last post by:
How can I found out what versions of HTML the browsers Netscape Communicator 4.8 and Internet Explorer 6.0 support? Is there a general method for any version of any browser?
133
by: Alan Silver | last post by:
Hello, Just wondered what range of browsers, versions and OSs people are using to test pages. Also, since I don't have access to a Mac, will I have problems not being able to test on any Mac...
3
by: lister | last post by:
Hi, I have several parts of my page that are shown/hidden via javascript controlling the "display" style. I was contemplating what will happen on browsers that do not support CSS (eg text...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.