Previous Message
Next Message

Re: [css-d] xhtml/css help wanted

Sent by Rijk van Geijtenbeek on 30 January 2002 11:11

On Wednesday, January 30, 2002, aardvark wrote:
>> From: Char James-Tanny [EMAIL-REMOVED]>

>> Opera can be set to emulate different browsers. Select File | Quick
>> Preferences and verify that "Identify as Opera" is selected.

a> i was under the impression that it was *not* emulating them, but 
a> simply changing the HTTP User Agent string it sends in the HTTP 
a> headers...

That's correct, with on exception.

>> I've found that Opera matches IE6 in most cases. However, if it's set
>> to emulate another browser, it adopts that browser's...errr...quirks
>> ;-)

a> are you sure it's not because the site was serving HTML/CSS 
a> hacked for a browser you aren't using?  many sites serve different 
a> code based on the browser as determined from the UA string...

The exception is the (incomplete) support for MSIE specific JavaScript
properties, like document.all. This support is only enabled when the
user choose to identify as MSIE. This was a useful trick in the time
that many script had two forks: 

 if (document.all) {}
 else if (document.layers) {}
 else {get lost}

More modern scripts with a third fork
  if (document.GetElementById) {}
should take care to check for this before checking for document.all.
Identifying as MSIE is still the default setting in Opera.

 Rijk                            [EMAIL-REMOVED]

Mot du Jour:
Any philosophy that can be put in a nutshell belongs there.
Previous Message
Next Message

Message thread:

Possibly related: