VK said:
Oh that Safari...
:-(
Is there anything this browser (does)&&(does it properly) ? Most
of the time this expression returns false AFAICT.
But your definition of "properly" is not influenced by knowing what
'properly' would be, and instead substituting 'what I expect', which
doesn't count for much.
But you are right, both Safari and Opera do try to execute text/Jscript
as if they indeed had some JScript engine.
Having put considerable effort into making Opera support large chunks
of the IE object model it would be foolish to keep scripts written by
people with foolish notions of supporting IE only from using those
features.
At the same time Opera ignores say "text/foobar". So it does
recognize the type attribute, it is just another case of UA spoofing
some wannabes are so badly known for.
You can not have it both ways. Either browsers adopt Microsoft's de
facto standards, as you assert they should, or they don't. The
consequences of attempting to do so is that scripts that would be
expected to work on IE should work on those browsers as well.
So I take my words back about "text/Jscript" bulletproofness.
You were a fool to say it in the first place, given your well known
ignorance of anything but the most common/obvious browsers.
For a really extended coverage there is only text/javascript with
conditional compilation (IE).
And the more conditional comments re used to keep scripts from browsers
that could cope with them the higher the likelihood becomes that some
other browser will implement them and pretend to be IE. The need to
spoof follows from the attempt to discriminate.
I see the most known way right now as
if(window.ActiveXObject), but I wouldn't count on it on a long run:
You probably see it that way because you are not aware that some
browsers already spoof a global - ActiveXObject - constructor
specifically to defeat that type of browser discrimination (such as
IceBrowser from version 5).
from my observations as soon as some "reliable" property check
goes into wide use, the spoofing gang adds a loophole for that in their
engines.
<snip>
I doubt that your observations have had that outcome (you are not even
capable of observing when and why the scripts you write don't work).
More likely it was people repeatedly pointing it out to you. Otherwise
you would not still be proposing methods of discriminating between
browsers (having understood what it was that made them ineffective).
Richard.