[plug] OT: Sites bow to Microsoft's browser king
Colin Muller
colin at twobluedots.com.au
Mon Jul 22 14:35:42 WST 2002
On Mon, Jul 22, 2002 at 10:21:01AM +0800, Simon Scott wrote:
> A lot of ppl browse with Javascript turned off, meaning any JS
> sniffers will fail.
Yes, using Javascript in a way which does not leave you with a usable
page in non-JS browsers is not a good idea.
> Does anyone have a good way to get around this? It seems overkill to
> install mod perl or php just to parse the browser string.
Sniffing is bad for you, just say no :-) The most maintainable, least
painful way around it is simply to design page layouts which render
acceptably without customisation in (e.g.) the list of browsers I sent
through earlier, and if you can't fit plain-text browsers in, to
provide a plain-text alternative wherever possible, with a link to it
near the top of every non-plain-text page. On public Web sites,
browser sniffing has unpleasant side-effects:
- You can't guarantee that proxy servers will take any note of the
browser being used, so they may serve up the wrong version.
- You give yourself a much larger maintenance job on the layouts
- People generally use one of these to work around browser bugs:
- if browser name is blah and browser version equals x.y
- if browser name is blah and browser version >= x.y and <= z.a
- if browser name is blah and browser version >= x.y
- If you choose one of the first two, then when the next browser
version comes out, if it still has the same bug your code won't
be activated. If you choose the latter, the code you made for
the previous version breaks under the new version if it doesn't
have the bug earlier but has a different one. So you need to
design a default layout which works for the widest common
demoninator. And if you do that, you don't need to sniff
browsers, since it will work in all of them.
Colin
More information about the plug
mailing list