W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2001

(no subject)

From: Vadim Plessky <lucy-ples@mtu-net.ru>
Date: Tue, 25 Dec 2001 01:33:39 +0000
Message-Id: <200112242235.fBOMZGH32411@post.cnt.ru>
To: sethmr@bellatlantic.net, w3c-wai-ig@w3.org
On Monday 24 December 2001 22:00, Seth Rothberg wrote:
|   And because I'm designing by the seat of my pants here, trying to be
|   practical rather than theoretical, I know right away that to implement
|   multiple versions of a site I'm either going to need a sniffer or an
|   accessible intro page that allows a visitor to choose which version of
| the site he or she would like to browse.
|   The browser sniffer bothers me because I've never seen one that isn't
| creaky and full of holes, that doesn't misread visitor's browsers. The
| intro page solution bothers me because I don't want visitors to have to
| fill in a form just to visit my site.

Hi Seth!

Can you please consider attached sniffer (browser detection) code which I 
tend to use (and ask other people to use when they want to detect browser 

I hae tested around 1300 web sites (trying to catch different bugs in 
Konqueror and write numerous testcases), and can tell that most problems come 
usually from bad browser-detection code.
Netscape heavily contributed to this situation, as their sniffer code is 
worst from what I have seen (and does really bad work for detection of 
browser capabilities)
Of course, you need to have JavaScript enabled to get this code working :-)
// but you can't do any on-page browser detection without JavaScript, anyway.

You should make 4 branches of code if you want support all existing browsers
It should be like this

if ( DOM) { ... dom code }
else if ( doc_all ) { ... document.all code)
 else if ( doc_layers) { ... document.layers code, for NN 4.x }
   else { ...  all other browsers, supposely without DHTML support }

current userAgents say nothing about browser capabilities, so it's useless to 
detect userAgent in most cases.
And there is no warrantry that future versions of browsers will provide any 
info in userAgent at all...

|   Seth


Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
KDE mini-Themes

Received on Monday, 24 December 2001 17:35:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:15 UTC