Wednesday, December 16, 2015

User agent tests, and other foolishness

When will major developers get a clue that user-agent strings, or similar, are not an acceptable substitute for browser capability checks?  Twice in the last week I've run into this nonsense from major developers. 

https://lightsaber.withgoogle.com/ uses a straightforward user-agent check to declare my default firefox in linux as an "incompatable computer", and not indicator of what it finds compatible.

And the javascript provided to go with the unity3D plugin, formerly employing a user-agent check, now checks navigator.platform for the same purpose, but not so readily spoofed by a user-agent switcher.  The unity3D plugin also has another foible making life difficult for linux users:  Updates to the plugin are deployed to the same URL, breaking the checksum pipelight uses to ensure a valid download.