
Originally Posted by
cr3ative
That doesn't really answer his question - because it can be done.
Lots of things can be done, but it doesn't mean they should be. If someone is to give advice, they should be able to determine when to give what was asked for, or what was needed. In this case, a script is probably[1] not needed.
The question of unreliability was raised before (by you?), and is a valid point.
I'm glad you appreciate that.
But see it this way - 95% of internet users have installed either MSIE, Mozilla or FireFox, [...]
Statistics like that vary wildly with the visitors a site might attract. It's hardly a universal truth. Besides, given that you accept the possibility of spoofed user agents, how do you know that those statistics aren't affected? (That is, of course, a rhetorical question).
Fishing after the 5% of people who
choose to re-label their browser [...]
It's not necessarily the users that choose to spoof their browser, but the manufacturer. You're going to punish the user for something they didn't do? That's hardly fair.
is not really worth the effort.
What effort? In this case, we're probably talking about a single rule in a style sheet. That's certainly easier, smaller, and quicker than a robust detection script. Why a hack when there is far more sensible approach?
Code:
<script language="JavaScript" type="text/JavaScript">
The language attribute has been deprecated for over six years. Even so, the type attribute makes it redundant.
Mike
[1] Unless the OP shows the mark-up involved, it's not possible to say with certainty.
Bookmarks