News for hackers. Stuff that matters.

Why do popular sites not detect desktop browsers and redirect an m.* domain?

When browsing a "canonical" domain sites often detect a mobile browser by the User Agent header and redirect to m.* (such as m.facebook.com).

It's a bad habit to have 2 versions instead of one fully responsive one, but this is a question for another debate which has seen lots of discussion already.

But somehow sites (and again, I include Facebook as a prominent example) don't sniff the other way around when a user comes to their m.* domain from a desktop browser and don't redirect them to the canonical domain.

That results in people browsing these sites from mobile, sharing m.* links which people then open in their desktops and see a very weird mobile-oriented display.

My question is why do they not do that detection? is it pure negligence or is there something else behind it?

( 10 comments | 7 points | on HN )
Re:Why do popular sites not detect desktop browsers and redi... by nness on Sunday March 19, 2017 @08:05PM (#13910654)
I would guess that, in most cases, a mobile-specific site accessed on a desktop is still going to be far more usable than a desktop-specific site accessed by mobile.

Either way, as you mentioned, its a solution to a problem where the original solution itself wasn't great in the first place.

Re:Why do popular sites not detect desktop browsers and redi... by oferzelig on Monday March 20, 2017 @01:47AM (#13912029)
I agree with your first sentence, but I'm not comparing which one is worse. I'm just asking why do sites not redirect m.* addresses, when browsed from a desktop browser, to the canonical domains.
Re:Why do popular sites not detect desktop browsers and redi... by jklein11 on Monday March 20, 2017 @02:55PM (#13916693)
One argument I could see is that the canonical url is ambiguous where the m.* url is more likely to be intentional. If I am on my mobile phone, I will probably type facebook.com into the address bar, because switching keyboard context for the url would be more difficult. If I am on a desktop I am unlikely to type in m.facebook.com, unless that is the url that I really want.

If you think about it this way maybe it would make sense to have a d.* and m.* url. The URL without a suffix will remain the ambiguous case and you will be redirected based on which platform you are on. If you would prefer a specific version of the site, you could request it explicitly.

Maybe some type of prompt to easily switch versions if it recognizes a url/platform mismatch would be helpful in the case of shares that you described.

Re:Why do popular sites not detect desktop browsers and redi... by schoen on Sunday March 19, 2017 @08:48PM (#13910849)
A few people might have intentionally used the mobile version because it loads faster for them or more readily presents the information they wanted. I'm not sure I can think of a site that I currently use that way, but I think I've seen people do it in the past.
Re:Why do popular sites not detect desktop browsers and redi... by 0942v8653 on Sunday March 19, 2017 @10:11PM (#13911203)
mbasic.facebook.com has been suggested for this use by several HN users.
Re:Why do popular sites not detect desktop browsers and redi... by marssaxman on Monday March 20, 2017 @01:57PM (#13916225)
Wow, thank you! That's terrific - clean, simple design, and so far everything seems to work just fine without Javascript, too.
Re:Why do popular sites not detect desktop browsers and redi... by oferzelig on Monday March 20, 2017 @08:13AM (#13913423)
Very bad looking site and really unusable.
Re:Why do popular sites not detect desktop browsers and redi... by schoen on Monday March 20, 2017 @06:13PM (#13918110)
Interesting contrast in the two replies that suggestion elicited!
Re:Why do popular sites not detect desktop browsers and redi... by teslacar on Sunday March 19, 2017 @08:45PM (#13910835)
good question ...it would be very easy to fix such a problem.
Re:Why do popular sites not detect desktop browsers and redi... by oferzelig on Monday March 20, 2017 @01:48AM (#13912034)
Yeah, it's not even a fix - just implementation of something that is not currently implemented.