3 ms·
Rather than being sent to the server, it might be okay in the first case if the UA was just exposed through the DOM as a property of the window.renderer; that w
by derefr 13y ago
Rather than being sent to the server, it might be okay in the first case if the UA was just exposed through the DOM as a property of the window.renderer; that way, the page, after delivery, could actively decide to apply a shim, but the initial content would be the same for everyone.
For the second case, you can at least do JS feature detection and send back the results with AJAX. That seems like the "public API" way of getting to know your users' capabilities, rather than trying to infer them from their UA strings.
- talmand 13y agoUsually I go with feature detection, but in this case I was unable to deduce how to do that. I would require broken feature detection, if I knew what feature was broken, or something along those lines.
- derefr 13y ago> broken feature detection Interesting idea! I can imagine an implementation--every day, along with updating a malware database, each browser pulls down the list of open bugs on its own bug tracker (and upstream component bug trackers) applying to its own version. Then, from Javascript, you could say something like if(window.renderer.hasBug("http://trac.webkit.org/3440224")){ /* you're on a version of WebKit affected by this bug */ } The nice part of this is, to get a globally-unique token identifying a bug you just noticed, you "just" have to file it with the party responsible for fixing it. When the bug is closed, so does your code-branch :)