Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Opera sniffing and support

1:04 pm on Jun 17, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
votes: 0

I've been doing some clean-up on various javascript code, now that all kinds of new browsers are out there. It is my intention not to write pages that blow up in Opera5, NN6 or IE6. Here's what I'm looking at right now.

Several authors say that a good object test for Netscape 6 is to look for these two conditions:

1. Support for GetElementById
2. Lack of support for document.all

However, Opera also passes this Netscape 6 test -- whoops!

Since Opera can be set to identify itself as various agents, reading the string is not dependable. So, I'd really prefer an object test, if one exists. Otherwise, it seems like I would need to write one code for both NN6 and Opera 5. Does anyone know if this means trouble in any way?

Here's some of my recent reading on this topic--
JS support in Opera 5 [opera.com]
Mozilla's Ultimate Browser Sniffer [mozilla.org]
Doc Javascript's Browser Sniffer [webreference.com]