3 ms·
I'm sorry, but I still find the user agent string to be incredibly useful despite it's many shortcomings. Not so much for deciding what to serve to a request,
by debaserab2 11y ago
I'm sorry, but I still find the user agent string to be incredibly useful despite it's many shortcomings.
Not so much for deciding what to serve to a request, but moreso to analyze your audience and figure out from a technical perspective what is feasible and what is not. For example, a recent decision I made was to decide whether or not to rewrite a portion of our application in a javascript framework that did not offer IE8 support. I was able to quickly validate what portion of my userbase I was affecting by looking at user agent strings.
Request headers are a fantastic way to capture this little bit of information. Using javascript feature checking depends on a javascript engine successfully loading and parsing whatever scripts I've provided to the client. Request headers are simple plaintext that don't fail in even the most bare bones of situations.
- fkooman 11y agohttps://en.wikipedia.org/wiki/Progressive_enhancement https://en.wikipedia.org/wiki/Progressive_enhancement https://en.wikipedia.org/wiki/Fault_tolerance https://en.wikipedia.org/wiki/Fault_tolerance No need to do browser detection. Just make your site work without JS as well :)
- jerf 11y agoTen years ago, that may have been valid advice, when "dynamic" mostly meant "server-generated". But if you're creating a website that is heavily JS-based, it does no good to serve 25% of your customers a perfectly-standards-compliant page telling them their JS won't work, so the site can't do its thing. You still need to know what client base you are supporting, no matter what.