What I’m complaining about is code like this:
var is_mac = (agt.indexOf("mac") != -1); where they decide a system is a mac or not based on the 3 letters mac being in the user agent string, user agents string contain all sorts of weird and wonderful names just a quick grep of last weeks logs of this site showed up Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:0.9.4)+Gecko/20011128+Netscape6/6.2.1+(emach0202) now Google thinks that’s a mac, do you? This isn’t someone screwing around with their string, but just a custom build and distribution of the browser, all browsers do it. Then there’s things like
Looking deeper into the google script - I’ll use the Groups Beta, as everyone can look at that script, but GMail is similar if not worse by virtue of the sheer weight of script, we see lots of browser sniffing, no error protection - so browsers which spoof as IE, but aren’t quite, they just get errors. They rely on popups but don’t check to see if they work etc.
The main GMail code isn’t as bad, it’s reasonably well thought out, but contains all the same browser detection gibberish as above, there’s some error protection, but no attempt to recover, still the script file is loaded once when you go in and everything done with IFRAMES, so it should be easy for people to bolt on gmail extensions that change the way it behaves - of course you may well be fighting battles as they change the script “protocols”.