3 ms·
I too would like a world where all browsers implemented fully the same standard but that's not how it worked out (or it ever works). This is an amusing (scary?
by gtirloni 9y ago
I too would like a world where all browsers implemented fully the same standard but that's not how it worked out (or it ever works).
This is an amusing (scary?) article about the history of the user-agent:
https://webaim.org/blog/user-agent-string-history/ https://webaim.org/blog/user-agent-string-history/
- maxk42 9y agoYes but you should be testing browser capabilities not user agents.
- gtirloni 9y agoTotally agree. https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_de...
- mattmanser 9y agoThe requires more steps and a slower process. User-agent is a one step process. Browser capabilities means returning something back to the browser and potentially coming back to the server. While it has obviously been abused, neither way is ideal. There's no way for a server to say "tell me the browser capabilities before I serve you the request".