Trying to keep up with the cool kids I spent a little time last night reading through some of the source code of healthcare.gov. Naturally the one thing that caught my attention was a snippet of script which attempts to do mobile device detection from healthcare.gov/js/all.js
What's most interesting to me about this particular chunk of code, other than hard-coding multiple SPOF (MSOPS?!) for your mobile strategy is the fact that variations of this script keep popping up. It's all over the web.
(Good luck getting that script updated for the thousands of sites and applications, you say to yourself, where it's laying dormant just waiting to send devices the wrong content based on a UA substring.)
This kind of pattern we see time and time again makes me a little bit sad (blog once, destroy everywhere). Don't be too hard on yourself if you've used this same script though—I've been prone to sadness ever since I saw E.T. as a small child. :(
Spoiler alert: E.T. actually pulled through; so let's continue trying to build a better web for everyone.