285

alt textCaption

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".

top 25 comments
sorted by: hot top controversial new old
[-] Tin@lemmy.blahaj.zone 16 points 4 hours ago

"yer a jedi, harry" - Gandalf

[-] dan@upvote.au 23 points 7 hours ago* (last edited 5 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@lemmy.one 15 points 7 hours ago

A URL is not an agent string, just saying.

[-] apprehentice@lemmy.enchanted.social 83 points 11 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@upvote.au 13 points 7 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@fedia.io 27 points 11 hours ago

It's called feature detection and it goes a long way back, even before Modernizr popularized it.

[-] GammaGames@beehaw.org 3 points 8 hours ago

Popularized? That gets less than 100k downloads a week

[-] dan@upvote.au 5 points 7 hours ago* (last edited 7 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.

[-] GammaGames@beehaw.org 1 points 6 hours ago

Neat, thanks for clarifying! I’ve never heard of it

It used to be huge.

[-] Xanthrax@lemmy.world 7 points 8 hours ago* (last edited 8 hours ago)

Web UI for touch screens is a lot different than keyboard and mouse. I still switch to desktop most of the time because the mobile site will lack critical info, though. They "have" to streamline the experience for mobile, but I hate it when they fully remove features.

[-] Quacksalber@sh.itjust.works 13 points 11 hours ago

Youtube currently (for weeks now) does not work on Firefox, if you don't use a Firefox user agent. Google doing sketchy things again.

[-] RustyNova@lemmy.world 1 points 14 minutes ago

Uh... I use librewolf that force a chrome + windows user agent and its totally fine?

[-] Quacksalber@sh.itjust.works 1 points 11 minutes ago

Then charmeleon must change more than just the user agent

[-] Carighan@lemmy.world 1 points 1 hour ago
[-] Quacksalber@sh.itjust.works 1 points 28 minutes ago

What works? YT on Firefox or YT on Firefox when the user agent is changed?

[-] tyler@programming.dev 9 points 6 hours ago

YouTube works fine on Firefox…

[-] KairuByte@lemmy.dbzer0.com 25 points 9 hours ago

I’ve not run into this issue and use Firefox exclusively with ublock origin

[-] Quacksalber@sh.itjust.works 2 points 9 hours ago

I use Charmeleon, with the effects described above.

[-] Carighan@lemmy.world 0 points 1 hour ago* (last edited 1 hour ago)

So you don't use Firefox, you mess with Firefox. That's on you then. Devs can't be held responsible for you intentionally breaking things. Only do what you know works.

[-] sacbuntchris@lemmy.world 10 points 10 hours ago

Lazy web developers or clueless managers have entered the chat

[-] OpenStars@discuss.online 17 points 9 hours ago

Is it... (scrolls wheel of browsers) Lynx?

[-] CanadaPlus@lemmy.sdf.org 7 points 7 hours ago* (last edited 7 hours ago)

I'm still amazed at how usable Lynx is, given the insane premise of the application.

[-] deltapi@lemmy.world 3 points 5 hours ago

What's so insane about it? Web browsers are an evolution of the old gopher protocol. All this stuff has roots in text consoles.

[-] PrimeErective@startrek.website 13 points 11 hours ago

A new browser touches the beacon

this post was submitted on 20 Sep 2024
285 points (98.6% liked)

Programmer Humor

19198 readers
1327 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS