> Yes, that's precisely the violation of Postel's Law I was
> thinking of.

Steve, someone is sending us this User-Agent, is that you?:))

User-Agent: Mozilla 5.0 (Compatible; with Safari, with Opera, Chrome, Netscape, 
MSIE etc. You get the idea. It's compatible with everything!) Let me tell you a 
story. Once upon a time, there was a browser named SeaMonkey. It was of noble 
inheritance, as it was a direct descendant of the famous Netscape of old. Oh, 
it could have been so proud, this browser, it could have stood up, radiant and 
tall and strong. But no, that was not to be. Many websites closed their doors 
for this browser, saying, We don't know who you are, go away! And poor 
SeaMonkey would have no other choice than to go in disguise, to make the 
websites believe it was some other browser. And you who read this, you are one 
of those websites that are putting SeaMonkey to shame. Listen. All browsers 
support HTML. If you just send the same HTML, all browsers will accept it. Only 
in some borderline cases will the page you send to the client need to be 
tailored to a specific client. In the majority of cases, the standard HTML you 
send to, say, Opera, can be sent to every other browser as well; K-Meleon, 
Galeon, etc. There is no need to scan the user agent string for keywords like 
Firefox, Konqueror, Midori or whatever. Just send the standard HTML, OK? But 
even if you do scan the user agent string, even if you do insist on sending 
different stuff to different browsers, you should look for distinguishing signs 
of the rendering engines: Gecko, Webkit, KHTML, Trident, Presto, and so on, not 
for different browser names. SeaMonkey works the same way as Firefox, Netscape 
and Flock; they all have Gecko/yyyymmdd in the user agent string. Similarly, 
Google Chrome works the same way as Safari, Midori and SRWare Iron; they can be 
identified by the word AppleWebKit in the string. And so on. Distinguishing 
browsers by name is not only overkill, but it even can backfire in cases such 
as this, when a misrepresentation is made. Anyway, even more important than 
that, above all, what you never ever should to is send fatal errors! The real 
error, incidentally, is not in the content part of the page you send, but in 
the header: putting info in the header that identifies the page as XHTML, while 
sending the content of the page as HTML, which will trigger the fatal error 
message. Errors like that will make you look silly, or worse, they make you 
look like you're doing it on purpose; sending bad stuff to some browsers, while 
sending perfectly OK looking pages to others. You're not REALLY doing it on 
purpose, are you? Trying to make people think that their browsers aren't good 
enough, that for instance MS Internet Explorer is a better browser than the 
ones they're using now, because MSIE can display the site while their own 
browsers can't? No, let's just give you the benefit of the doubt; you're not 
doing it on purpose. Blame your content management system if you want. Still, 
it's nothing I can help from here; you will have to make the change to your 
site to make sure to not saddle some browsers like SeaMonkey or Kazehakaze with 
your errors. So please, would you consider having a look? Thanks in advance!

Cheers,
Domas
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to