At 10/7/04 12:58 AM, BillGates wrote:
Actually, it should look more like this:
HTML:
<head>
-- …
-- <script type="application/x-javascript" src="firefox.js"></script>
</head>
firefox.js:
var user_agent = navigator.userAgent.toLowerCase ();
if ( user_agent.indexOf ('firefox') != -1 ) {
-- alert ('You are using Mozilla Firefox.');
}
What on earth are you bumbling on about now? So what you've done here is to make a variable of the user agent rather than just access it directly? What sense/difference does that make? And if having to access an external file to accomplish something as simplistic as this is "progression", then I retract what I said about progression being a good thing.
In this case, using a MIME type IE hasn't learnt yet is irrelevant
Eh? User agent is available as of Javascript 1.0. It has nothing to do with MIME type and isn't something that MSIE 4.01 and above can't handle.
Hey, I'm not saying Firefox is perfect, perhaps it does need to get on the ball regarding ECMAScript, the W3C DOM, or whatever you were alluding to (assuming it is a standard or unofficial industry convention [which doesn't violate standards]).
What I'm talking about are functions that have existed since way back, when javascript was first finding its feet. These functions (in Firefox) have now been "removed" or ceased to work as they once did, with no other explanation that I have stumbled across in the Mozilla documentation than, "Not in DOM standards." And by that, I can only assume they mean their own revised/re-thought standards.
I have a book published June 1998, endorsed by Brendan Eich (creator of javascript), which contains the functions I'm referring to... So if you're going to tell me that these functions aren't part of any standards (or that they're irrelevant and probably shouldn't be covered in backwards compatibility issues), save your fingers the bother of typing it up.