Re: Some questions from CHI-WEB people

you could use the user agent to detect lynx though and serve
accordingly.

----- Original Message -----
From: "Vadim Plessky" <lucy-ples@mtu-net.ru>
To: <sethmr@bellatlantic.net>; <w3c-wai-ig@w3.org>
Sent: Monday, December 24, 2001 8:33 PM


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
type)?

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
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/

Received on Monday, 24 December 2001 21:04:54 UTC