this post was submitted on 19 Apr 2025
178 points (100.0% liked)
Today I Learned (TIL)
7358 readers
78 users here now
You learn something new every day; what did you learn today?
/c/til is a community for any true knowledge that you would like to share, regardless of topic or of source.
Share your knowledge and experience!
Rules
- Information must be true
- Follow site rules
- No, you don't have to have literally learned the fact today
- Posts must be about something you learned
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Does what? Have a separate site for mobile viewing? There's many good reasons..
It would be better to handle it by detecting what device you’re on rather than having encoded into the url. That way it wouldn’t matter what device the page was shared from.
That's a terrible idea. Because many users change their user agent for security.
No, you can't expect to detect what devices someone has. That's the thought process of an inexperienced dev.
They already do this to redirect from the desktop view to the mobile view so they could do it the other way but don’t for some reason.
If a user changes their user agent to something that would cause a site to not be able to determine whether they are on desktop or mobile then they can expect that some sites aren’t going to work well.
The problem is that the site tries to detect the device type. If you let the user choose it and make it sticky by domain, you dont have that issue.
But your users have the problem that they go to the wrong site if someone on a mobile device shares a link when you’re on desktop.
It just seems inconsistent for them to detect mobile devices but not desktop devices.
That doesn't sound like a problem. It sounds like a feature.