alt text
Caption
Web dev: What browser is visiting the page?
User agent string:
A screenshot of a browser. The URL bar reads firefox://settings
, a button on the URL bar is labelled Netscape, a popup from the button reads: “You’re viewing a secure Opera page”, and the web page title reads “Chrome settings”.
- Tin ( @Tin@lemmy.blahaj.zone ) 8•1 hour ago
“yer a jedi, harry” - Gandalf
- dan ( @dan@upvote.au ) 9•2 hours ago
User agents are essentially deprecated and are going to become less and less useful over time. The replacement is either client hints or feature detection, depending on what you’re using it for.
- simonced ( @simonced@lemmy.one ) English4•4 hours ago
A URL is not an agent string, just saying.
- OpenStars ( @OpenStars@discuss.online ) English9•6 hours ago
Is it… (scrolls wheel of browsers) Lynx?
- CanadaPlus ( @CanadaPlus@lemmy.sdf.org ) 6•4 hours ago
I’m still amazed at how usable Lynx is, given the insane premise of the application.
- apprehentice ( @apprehentice@lemmy.enchanted.social ) English45•8 hours ago
Functionally useless. With the web standardized, we shouldn’t need user agents anyway. It would be more beneficial to ask “do you support X, Y, and Z?”
- dan ( @dan@upvote.au ) 3•4 hours ago
That’s exactly what you’re supposed to do with the modern web, via feature detection and client hints.
The user agent in Chrome (and I think Firefox too) is “frozen” now, meaning it no longer receives any major updates.
- Maestro ( @Maestro@fedia.io ) 15•8 hours ago
It’s called feature detection and it goes a long way back, even before Modernizr popularized it.
- Gamma ( @GammaGames@beehaw.org ) English3•5 hours ago
Popularized? That gets less than 100k downloads a week
It used to be huge.
- dan ( @dan@upvote.au ) 4•4 hours ago
Most developers just write their own feature checks (a lot of detections are just a single line of code) or use a library that polyfills the feature if it’s missing.
The person you’re replying to is right, though. Modernizr popularized this approach. It predates npm, and npm still isn’t their main distribution method, so the npm download numbers don’t mean anything.
- Gamma ( @GammaGames@beehaw.org ) English1•3 hours ago
Neat, thanks for clarifying! I’ve never heard of it
- PrimeErective ( @PrimeErective@startrek.website ) 9•8 hours ago
A new browser touches the beacon