News for hackers. Stuff that matters.
Re:Show HN: I made a modern web UI for Wikipedia by jitix on Monday December 06, 2021 @01:18PM (#29463504)
I agree with you except the one pain point that Wikipedia still continues to use "m.*" sub-domains for displaying mobile content. I know most people exclusively use mobile these days but I use desktop browsers for reading more than 60% of the time and its really annoying to click on a Wikipedia link on HN/Reddit and having it open the mobile site on desktop. It's OK to use m.* subdomains instead of reactive design but there should at least be redirects to the correct subdomains.

edit: formatting

Re:Show HN: I made a modern web UI for Wikipedia by pc86 on Monday December 06, 2021 @02:49PM (#29464653)
What bothers me most about this is that if you go to www on a mobile device, it redirects you to m - that's great, and probably the "right" thing to do. There is probably a "View Desktop Version" link on the mobile page, somewhere. But if you go to the m subdomain on a desktop device, there's no easy way to get to the desktop version without manually changing the URL. If you can redirect from www to m, surely you can redirect from m to www when appropriate.
Re:Show HN: I made a modern web UI for Wikipedia by zamadatix on Monday December 06, 2021 @02:57PM (#29464767)
> But if you go to the m subdomain on a desktop device, there's no easy way to get to the desktop version without manually changing the URL.

You may find humour in the comically small "desktop" link at the very end of the page, next to the privacy policy.

Re:Show HN: I made a modern web UI for Wikipedia by aembleton on Monday December 06, 2021 @05:57PM (#29466847)
I use the No More Mobile plugin to fix that: https://github.com/spixy/NoMoreMobile
Re:Show HN: I made a modern web UI for Wikipedia by tekknik on Tuesday December 07, 2021 @10:07AM (#29473196)
For me on safari I just click “request desktop site” and it does redirect me to the non mobile domain.
Re:Show HN: I made a modern web UI for Wikipedia by maximedupre on Monday December 06, 2021 @03:10PM (#29464937)
I feel like there's the issue on Reddit
Re:Show HN: I made a modern web UI for Wikipedia by mananaysiempre on Monday December 06, 2021 @04:13PM (#29465802)
I feel like this is the least of the issues of Reddit(’s mobile version, social ones excluded for lack of knowledge).
Re:Show HN: I made a modern web UI for Wikipedia by grishka on Monday December 06, 2021 @03:43PM (#29465417)
I got annoyed at this enough to write this tiny userscript:

    // ==UserScript==
    // @name         Redirect from mobile wiki to desktop
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        https://*.m.wikipedia.org/*
    // @grant        none
    // @run-at       document-start
    // ==/UserScript==
    
    window.location.hostname=window.location.hostname.split(".")[0]+".wikipedia.org";
Re:Show HN: I made a modern web UI for Wikipedia by selcuka on Monday December 06, 2021 @07:49PM (#29467836)
Hint: Use `document.location.replace()` to prevent the back button from going back to the mobile version, creating an endless loop.
Re:Show HN: I made a modern web UI for Wikipedia by t-writescode on Monday December 06, 2021 @01:37PM (#29463739)
Equally, I don't like it when websites try to guess what kind of browser I'm in and force me into the mobile experience when I have a window take up half the screen on a 1080p monitor, ... so I guess there's really no easy win for this :(
Re:Show HN: I made a modern web UI for Wikipedia by dorianmariefr on Monday December 06, 2021 @02:08PM (#29464163)
I think proper media queries breakpoints solve this
Re:Show HN: I made a modern web UI for Wikipedia by mattnewton on Monday December 06, 2021 @02:41PM (#29464565)
This is hard and often done wrong- mobile phones are usually high dpi and have gotten quite large, so it can be hard to distinguish between a large phone and half a desktop screen. Some people get quite annoyed by being bumped into a mobile experience when you resize your window from fullscreen on a laptop.
Re:Show HN: I made a modern web UI for Wikipedia by iggldiggl on Monday December 06, 2021 @03:14PM (#29464983)
> This is hard and often done wrong- mobile phones are usually high dpi and have gotten quite large, so it can be hard to distinguish between a large phone and half a desktop screen.

A tablet could be easily confused, or a phone in landscape mode, too, but for a phone in portrait mode this seems a bit hard to imagine, because DPI is taken into account when converting the display width into CSS pixels, so even a phone cramming 1080 or 1440 or whatever amount of physical screen pixels into its display width should still come in at something like 300 to 400ish CSS pixels. Or am I misunderstanding something?

Re:Show HN: I made a modern web UI for Wikipedia by mattnewton on Monday December 06, 2021 @03:48PM (#29465470)
You're right, and it's certainly a solvable problem but one that often is not solved correctly is my point. You may have to also introduce a (nonstandard) viewport tag to prevent mobile browsers from laying out the page at a much higher resolution and then zooming/shrinking on you https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_m... If you don't, you may falsely conclude from manual testing that you need large breakpoints for mobile.

Also, many times mobile breakpoints don't look at the device orientation and pick numbers like 800px, to capture landscape orientation on medium sized phones or something (I'm not sure where this number comes from to be honest). This obviously breaks the two windows side by side case on laptops but is a top result for me if you google the arcane syntax for how to target mobile browsers with a media query.

I am not 100% sure what all the pitfalls are with the current interface, but they exist often enough for me to run into them semi-frequently on smaller laptops.

Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @03:05AM (#29470093)
You're goning to need <meta name="viewport" content="width=device-width, initial-scale=1"> tag for any reactive design with mobile browsers since otherwise the site will look completely different between browsers and browser versions as they use different rules for how to render sites.

The worst part of this is that simple mostly text sites without a fixed-with layout would look perfectly on mobile if this tag was the default but somehow mobile browser vendors thought it was better to hack around sites with table layouts by giving them a larger viewport (but still inconsitently scale the font sizes so you have to zoom in and out to read different parts).

Re:Show HN: I made a modern web UI for Wikipedia by iggldiggl on Tuesday December 07, 2021 @03:52PM (#29478066)
> (but still inconsitently scale the font sizes so you have to zoom in and out to read different parts)

Once you start with the hack of giving non-mobile-compatible pages a larger viewport in order to not break layouts that react allergic when being squeezed into 300-something pixels, what else do you want to do?

Not scaling font sizes at all just gives you either tiny text (if you zoom out to fit the large viewport onto the small mobile screen) or loads of scrolling around if you display the page at 100 % zoom level instead.

And scaling up all text means you end up approximatively just where you started before you started resizing the viewport. It might not be absolutely exactly the same layout breakage as when squeezing an old page directly into the 300 or so pixels available on a mobile phone in portrait mode, but it will be pretty similar.

So that only leaves trying to scale up only the main body of text (which normally isn't that sensitive with regards to scaling up the font size and therefore increasing its size requirements) and leaving alone smaller bits of text like menus, the page navigation etc., which are more likely to be size-constrained and start causing layout breakage if increased by an extraordinary amount.

Re:Show HN: I made a modern web UI for Wikipedia by frosted-flakes on Monday December 06, 2021 @03:19PM (#29465048)
You have it right.
Re:Show HN: I made a modern web UI for Wikipedia by Wowfunhappy on Monday December 06, 2021 @05:45PM (#29466713)
I don’t understand those people at all. If my browser window is the width of a mobile phone’s screen, than a version of the website designed for that size is exactly what I want!
Re:Show HN: I made a modern web UI for Wikipedia by girvo on Monday December 06, 2021 @06:24PM (#29467102)
Right! If you've got a window that narrow, the only way the design will even work or layout correctly is with the "mobile" layout...

The bigger problem is people hiding functionality if you're in the mobile breakpoint. That's an issue: all functionality should be enabled, at least in some way IMO. Mobile should never be a second class citizen :)

Re:Show HN: I made a modern web UI for Wikipedia by wtallis on Monday December 06, 2021 @07:00PM (#29467476)
There's also a big problem where the mobile layout will tend to make controls huge to present a reasonable size touch target. This is unnecessary on the desktop, and may even result in less information fitting on screen than before switching to the mobile layout.
Re:Show HN: I made a modern web UI for Wikipedia by girvo on Monday December 06, 2021 @07:10PM (#29467561)
Thats a fun one to solve!

   @media (hover: none) and (pointer: coarse) {
That allows the dev to select for devices that do not have a mouse and such rely on touch targets, to increase the sizing. I've been implementing this myself recently in our web application, while still allowing us to change the layout to fit the narrow width!

I'm sure there are some devices it doesn't fit perfectly for though. This stuff is capital-H hard.

Re:Show HN: I made a modern web UI for Wikipedia by Eduard on Monday December 06, 2021 @09:16PM (#29468446)
Re:Show HN: I made a modern web UI for Wikipedia by 3np on Monday December 06, 2021 @08:08PM (#29467988)
> capital-H hard

You mean quote-unquote Hard?

Re:Show HN: I made a modern web UI for Wikipedia by girvo on Monday December 06, 2021 @10:57PM (#29468935)
I wish.

The implementations for these have some... complications, the device sets we now deal with are huge, and making sure there are no idiosyncratic bugs that creep up when using them is legitimately a fair bit of work.

Re:Show HN: I made a modern web UI for Wikipedia by t-writescode on Monday December 06, 2021 @06:32PM (#29467173)
> If my browser window is the width of a mobile phone’s screen

It's not, is the thing.

I have a 23 inch screen for my 1080p screen. My phone has a 6ish inch diagonal.

When I make a window 960 x 1080, that's still something like 10 inches across and 11 inches tall. It's sheet-of-paper sized. I'm perfectly comfortable reading that as it was designed for a desktop layout.

Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @03:09AM (#29470119)
> I have a 23 inch screen for my 1080p screen. My phone has a 6ish inch diagonal.

Do you sit as close to your monitor as you hold your phone?

Re:Show HN: I made a modern web UI for Wikipedia by t-writescode on Tuesday December 07, 2021 @12:15PM (#29475266)
I would say that half of my monitor, more accurately, is about the dimensions of an iPad at comfortable viewing distance.

Phones are far taller than half of a 1080p screen.

Half a monitor is: 960 x 1080, or 1:1.125 A iPhone is: 828 x 1792, or 1:2.164

So websites tend to shove a candybar shape into a nearly square sheet of paper and waste a lot of usable proportions for things like controls or hamburger menus.

Re:Show HN: I made a modern web UI for Wikipedia by OJFord on Tuesday December 07, 2021 @03:37AM (#29470272)
Not GP, but yeah, about the same? From your phrasing I expect it's how close we hold our phones that differs though.
Re:Show HN: I made a modern web UI for Wikipedia by eadmund on Monday December 06, 2021 @09:10PM (#29468405)
Not necessarily: the real-world size matters too. Desktop-sized UI is hard to hit on a touchscreen when shrunk; meanwhile mobile-sized UI wastes space when enlarged on a desktop monitor.
Re:Show HN: I made a modern web UI for Wikipedia by hoseja on Tuesday December 07, 2021 @06:17AM (#29471272)
Do you also want the version for touch controls?
Re:Show HN: I made a modern web UI for Wikipedia by Robotbeat on Tuesday December 07, 2021 @12:43AM (#29469386)
I also get annoyed when I get bumped to the "mobile" "experience" even when I'm on a smartphone. With reactive design, "request desktop site" generally doesn't work, either.

I really, REALLY prefer desktop mode for almost everything, relying on pinch to zoom.

Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @02:51AM (#29470017)
> With reactive design, "request desktop site" generally doesn't work, either.

It shouldn't, because with proper reactive design therre are no "mobile" and "desktop" versions but only one version that adapts to the viewport size. If you want a larger viewport that should be solved at the browser level by providing the website with a larger viewport. Seems firefox behaves this way while chrome does something weird that increases the viewport a bit but then still "intelligently" scales some text.

Re:Show HN: I made a modern web UI for Wikipedia by Robotbeat on Tuesday December 07, 2021 @12:56PM (#29475875)
Well what if you don’t WANT the interface to change between viewports? We used to use Desktop-style interfaces on 1024x768 displays, or even 640x480. Now we just get a one-dimensional mobile interface when the viewport is smaller than whatever arbitrary threshold is fashionable among designers. It’s incredibly annoying to have interfaces become downgraded (ie hyper-simplified) regardless of what the user requests just because they haven’t kept up with the resolution upgrade treadmill. Pinch and zoom (in BOTH directions) is such a powerful UI tool from the user’s perspective but its usefulness has become completely neutered by insistence on “reactive” design ripping control away from the user.
Re:Show HN: I made a modern web UI for Wikipedia by girvo on Monday December 06, 2021 @06:19PM (#29467048)
The worst part is that the other points you could use: DPI, resolution, touch capability... all of this exists on certain laptops now!

But, at least as far as I approach media queries, if you've triggered the mobile breakpoint (well, default CSS as mobile-first is the way we approach it), its because the desktop design we've used literally will break on a browser window that narrow.

Re:Show HN: I made a modern web UI for Wikipedia by zelphirkalt on Monday December 06, 2021 @06:44PM (#29467304)
Even better: Don't have media queries breaking at some arbitraty widths at all, and have a design, which is responsive for all widths without breaking suddenly, orienting size of boxes depending on the content.
Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @03:12AM (#29470134)
As soon as you have any kind of columns in your layout you need sudden breaks at some points, explicit or not.

I agree that you should prefer flow and size-to-fit but that does not mean that break points are never the right tool.

Re:Show HN: I made a modern web UI for Wikipedia by YetAnotherNick on Monday December 06, 2021 @02:21PM (#29464338)
No, it won't. There is no clear distinction between mobile and tablet first of all.
Re:Show HN: I made a modern web UI for Wikipedia by alexchamberlain on Monday December 06, 2021 @02:34PM (#29464483)
Orientation and width not enough?
Re:Show HN: I made a modern web UI for Wikipedia by coldacid on Monday December 06, 2021 @02:58PM (#29464787)
When I pin a browser to the left or right side of one of my monitors, these sites will often go into mobile mode despite the fact that the browser is still wide enough that desktop mode works fine, merely because the window is now taller than it is wide. And I find that incredibly annoying.
Re:Show HN: I made a modern web UI for Wikipedia by Taywee on Monday December 06, 2021 @01:41PM (#29463795)
Install Firefox Redirector: https://addons.mozilla.org/en-US/firefox/addon/redirector/ Add a rule to redirect (https?://)?(\w+\.)m\.wikipedia.org(.*) to $1$2wikipedia.org$3 Then you never have to deal with mobile Wikipedia on desktop again. You can use this for other sites too, like forcing all uses of Reddit to always open in old.reddit.com.
Re:Show HN: I made a modern web UI for Wikipedia by kirb on Monday December 06, 2021 @08:13PM (#29468028)
Just as a sidenote on the Reddit point, you can force old Reddit from your settings after you log in. That setting seems to stick even if you log out/your session times out, and you can go back to new Reddit with new.reddit.com.
Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @01:44PM (#29463839)
> It's OK to use m.* subdomains instead of reactive design but there should at least be redirects to the correct subdomains.

I agree, although in the case of Wikipedia the "mobile" design is actually the one that is responsive. I want the "mobile" design on all browsers including my desktop. I believe you can actually set your default theme if you're logged into Wikipedia, but I don't know if their cookies eventually expire or what, but I often end up clicking on Wikipedia links and getting the awful "desktop" design.

All of this is just to say that, yes, they shouldn't use separate "m." URLs, but it's just as wrong to get upset at mobile users sharing "m." URLs as it is to get upset at desktop users sharing URLs without the "m." Arguably if you expect all users to always share the most versatile URL, you should expect them to always share the "m." URL since it has a responsive design.

Re:Show HN: I made a modern web UI for Wikipedia by stormbrew on Monday December 06, 2021 @01:52PM (#29463975)
I might be ok with "the mobile reactive version everywhere" if it didn't also lack a bunch of features. Not being able to easily get to the talk page to contextualize what you're reading makes the mobile site very frustrating.
Re:Show HN: I made a modern web UI for Wikipedia by frosted-flakes on Monday December 06, 2021 @03:20PM (#29465073)
Note that a link to the talk page has recently been added to the top of the mobile page.
Re:Show HN: I made a modern web UI for Wikipedia by stormbrew on Monday December 06, 2021 @09:44PM (#29468620)
Oh nice, thanks for letting me know! I can stop forcing it to desktop mode by default heh.
Re:Show HN: I made a modern web UI for Wikipedia by judge2020 on Monday December 06, 2021 @02:15PM (#29464254)
If it pinned the headings/outline to the left side of the article (like the extension showcased does) it'd be that much better for a responsive design on Desktop.
Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @03:19AM (#29470175)
I disagree that the m. url is the most versatile because of the one-sided redirect.

Also the mobile site might be more responsive in the sense that it better scales down to narrower viewports but it does not scale up to make use of larger viewports by e.g. bringing back the sidebar and other links that are hidden behind dropdowns. That's a problem with many mobile-first designs - in reallity they are mobile-only designs.

Re:Show HN: I made a modern web UI for Wikipedia by Arnavion on Monday December 06, 2021 @04:12PM (#29465795)
Yes, I only use Wikipedia on a desktop and I exclusively use the m. site.
Re:Show HN: I made a modern web UI for Wikipedia by CobaltFire on Monday December 06, 2021 @04:22PM (#29465901)
Counterpoint to this:

I’m career military and the fact that Wikipedia (and Facebook) have low bandwidth m.* redirects made life immensely easier on the limited internet in far off places. We really appreciated it being available.

Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @03:22AM (#29470200)
Just checked the first acticle linked on the home page:

https://en.wikipedia.org/wiki/Yugoslav_gunboat_Beli_Orao - 913.39 KB / 298.41 KB transferred

https://en.m.wikipedia.org/wiki/Yugoslav_gunboat_Beli_Orao - 919.43 KB / 270.18 KB transferred

Not much of a difference. Would be better to spend time optimizing the desktop site for everyone.

Re:Show HN: I made a modern web UI for Wikipedia by PaulHoule on Monday December 06, 2021 @03:14PM (#29464990)
I dunno. Maybe it is different on a phone but on a tablet the desktop Wikipedia is better than the mobile Wikipedia.
Re:Show HN: I made a modern web UI for Wikipedia by Swizec on Monday December 06, 2021 @03:17PM (#29465027)
+1 to this. My iPad is plenty big enough please show me the real Wikipedia. The redirect is incredibly frustrating.

On a phone, the mobile Wikipedia is perfect tho.

Re:Show HN: I made a modern web UI for Wikipedia by matheusmoreira on Monday December 06, 2021 @07:18PM (#29467613)
Yeah, it's so annoying. I always strip the mobile subdomain when I post links to wikipedia.
Re:Show HN: I made a modern web UI for Wikipedia by dpifke on Monday December 06, 2021 @03:01PM (#29464818)
Re:Show HN: I made a modern web UI for Wikipedia by account42 on Tuesday December 07, 2021 @03:28AM (#29470232)
That seems to be about serving the different variants directly instead of the redirect when there really should only be one variant that makes the best use of any viewport size.
Re:Show HN: I made a modern web UI for Wikipedia by chris_wot on Monday December 06, 2021 @01:36PM (#29463723)
Down the bottom there is a link to the desktop version of the site.
Re:Show HN: I made a modern web UI for Wikipedia by MawKKe on Monday December 06, 2021 @01:43PM (#29463826)
Whoa, thanks.

However, that link is totally in the wrong place, no wonder I could not find it. I just assumed there was no such link/button and always angrily removed the 'm.' from each URL.

Re:Show HN: I made a modern web UI for Wikipedia by kingcharles on Monday December 06, 2021 @02:43PM (#29464579)
TIL!
Re:Show HN: I made a modern web UI for Wikipedia by teddyh on Monday December 06, 2021 @01:34PM (#29463692)
Re:Show HN: I made a modern web UI for Wikipedia by paraknight on Tuesday December 07, 2021 @12:59AM (#29469474)
Just a small nitpick: you mean _responsive_ design (_reactive_ means something else)
Re:Show HN: I made a modern web UI for Wikipedia by rdubz on Monday December 06, 2021 @02:44PM (#29464597)
semi-OT but Twitter seems to have recently started putting "mobile.twitter.com" in my URL bar (on mobile), as well as adding a UUID in a "t" query param when you use their "copy link" flow, which is all annoying cruft to have to delete when sharing links.

They used to just put "?s=19" through "?s=22" or so, which enumerated clients (desktop, mobile, Android, etc), which was better than the junk most other services stuff in (like utm_source and friends...)

Re:Show HN: I made a modern web UI for Wikipedia by dwaite on Monday December 06, 2021 @10:44PM (#29468874)
It is also pretty fundamentally broken on iPad, since whether it reports itself as a mobile or desktop device depends on the size of the browser window.
Re:Show HN: I made a modern web UI for Wikipedia by sam0x17 on Monday December 06, 2021 @05:11PM (#29466361)
As one of the people who uses a mobile device only if I have no other choice (which is never), I definitely feel the pain of this.
Re:Show HN: I made a modern web UI for Wikipedia by GhettoComputers on Monday December 06, 2021 @01:33PM (#29463687)
I’m sure there is JS that will redirect you to non mobile, pretty sure I installed something like that and never had that issue.
[dead]
Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Monday December 06, 2021 @01:47PM (#29463890)
It's kinda strange that you think someone who is on a phone copying a link and sharing it with someone who is not on a phone, is the latter person "specifically ask[ing]" for the mobile page.
Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Monday December 06, 2021 @02:13PM (#29464223)
It's strange that when you ask for en.m.wikipedia.org, Wikipedia responds by giving you what you wanted?

There is no way to interpret requesting a dedicated mobile URL other than as specifically asking for the mobile version of the page.

Or are you saying Wikipedia should be aware that you got the link from your obnoxious friend? HTTP doesn't really allow for that.

Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Monday December 06, 2021 @08:40PM (#29468215)
No one is asking for en.m.wikipedia.org. Someone on their phone asks for en.wikipedia.org (or more likely clicks a link to it from Google or elsewhere), gets redirected to en.m.wikipedia.org (instead of serving a mobile or responsive page directly on en.wikipedia.org), and then copies the resulting link to their friend who didn't ask for any of this. And worse yet, in most cases neither party even notices the `.m.` much less knows what it means or to remove it to get a "normal" Wikipedia.

I think you vastly overestimate the number of people typing `en.m.wikipedia.org` in. I'm pretty sure the number of people doing that is negligible, in fact.

And by the way, I wouldn't care about the existence of en.m.wikipedia.org nearly as much if it actually were opt-in. Because then it would be a lot more rare. The problem is that Wikipedia opts you into it implicitly if you are on mobile. Which means that if anyone in a chain of clicking on and then sharing a link is on mobile... suddenly everyone sees the mobile link and needs to do much more work than "click on a link" to opt OUT of it.

Well over 50% of the Wikipedia links I see these days are mobile links and 0% of the time am I clicking on them from a mobile device.

Re:Show HN: I made a modern web UI for Wikipedia by namdnay on Monday December 06, 2021 @03:47PM (#29465464)
You need to take a step back. The end user is not asking for https whatever, they’re asking to see the same Wikipedia page their friend saw, adapted to their screen. Whatever gets in the way of that is bad UX

I guess the best way to do it would be to redirect the user to the correct domain based on agent, if they haven’t already chosen an override?

Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Monday December 06, 2021 @08:47PM (#29468268)
The best way to do it would be to not redirect at all but instead simply serve the different layout at the same URL using the same criteria they already use to redirect. (Or, of course, they could use something like CSS media queries for a responsive design with a single set of code!)

There's no reason for them to have a different URL for the mobile views (it should be a cookie or session state if the user explicitly overrides, otherwise automatic) and there IS a reason that Wikipedia is basically the only major site still in existence that doesn't serve up their mobile-designed view on the same URL. Yes, `m.` was a huge trend back in the days of "mobile" meaning "a crappy J2ME browser", but it's not anymore and for damn good reason!

Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Monday December 06, 2021 @06:03PM (#29466908)
> The end user is not asking for https whatever, they’re asking to see the same Wikipedia page their friend saw, adapted to their screen.

This is already the behavior of Wikipedia mobile pages.

> I guess the best way to do it would be to redirect the user to the correct domain based on agent, if they haven’t already chosen an override?

This, on the other hand, is already the behavior of Wikipedia's normal pages.

The mobile page will give you what you asked for, and the normal page will give you what it thinks you probably want. These are both approaches that you could argue for.

But I can't understand why everyone is trying to argue that the give-you-what-you-want approach is actually, if you think about it hard enough, the give-you-what-you-asked-for approach.

Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Monday December 06, 2021 @08:44PM (#29468245)
> This is already the behavior of Wikipedia mobile pages.

No, it's not. The behavior of the mobile pages is always mobile-optimized no matter what.

Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Tuesday December 07, 2021 @12:33AM (#29469352)
Yes. "Always the same no matter what" is what was described. If your friend is looking at a mobile wikipedia page, and sends you the URL for that page, then you too will see the same mobile wikipedia page when you follow the link. That's the whole concept of being "the same".
Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Tuesday December 07, 2021 @03:40PM (#29477932)
No, what was described was specifically "the same Wikipedia page their friend saw, adapted to their screen". "The same Wikipedia page their friend saw" meaning the same contents - the same rendered Wikitext - they don't care about getting the same experience, they want the same data. "adapted to their screen" meaning NOT seeing the mobile experience on a desktop!

I can only assume you are trolling because you are assuming a meaning that is the complete antithesis of what namdnay explicitly said (and what everyone else in this dead thread has been telling you). Therefore I will go ahead and say farewell and good luck.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @01:39PM (#29463767)
> But I would say that it's the HN commenters being incredibly obnoxious, not wikipedia being wrong for giving you the mobile site when you specifically ask for it.

But it's kinda crazy that if I'm on my phone I can't just share a URL to a page with someone who happens to be using a desktop. While I'm not sure if this is made explicit in any of the RFCs or standard docs, in my view a URL should be a locator for a resource that is agnostic of the user agent.

Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Monday December 06, 2021 @02:09PM (#29464189)
> But it's kinda crazy that if I'm on my phone I can't just share a URL to a page with someone who happens to be using a desktop.

> in my view a URL should be a locator for a resource that is agnostic of the user agent.

You're not making sense. The mobile page has a dedicated URL. If you're browsing it, then sharing the URL will send anyone else to the same resource you're browsing, regardless of their user agent. Everyone agrees that this is a bad thing for you to do. Don't do it.

The standard page will redirect mobile user-agents to the mobile page. It is a better URL to give out in every possible way. But note that this is the opposite of what you're saying; the URL that behaves the way you say you want is the bad one that you should avoid sharing.

I am sympathetic to the view that the URL should just point wherever it points. This would require a change to Wikipedia's standard page so that it would display when requested on mobile instead of redirecting. That's fine. But sharing mobile links would still be awful behavior. Link to the standard page. That's what makes it the standard page.

Re:Show HN: I made a modern web UI for Wikipedia by seppel on Monday December 06, 2021 @02:39PM (#29464533)
> You're not making sense.

The use case is: I go to the standard wikipedia page, browse a bit, and then I want to give out links to the standard wikipedia page of a specifig article.

This is currently not possible without editing the URL if you are on mobile. And I dont understand why wikipedia is refusing to fix this.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @02:49PM (#29464655)
Correct, and my claim is that there should be no such concept as "giving out a link to the standard Wikipedia page." Regardless of what type of device I'm using, I should be able to share the URL for that page to someone else regardless of what type of device they're using. The URL should literally be the uniform locator of that resource and shouldn't contain any semantics about any particular user agent's device.

This is pretty obvious in the general case, where it would be impossible for me to know if the URL I am visiting contains information about my particular user agent and is thus inappropriate to share with people with other user agents. When my user agent requests "en.wikipedia.org" and receives a redirect to "en.m.wikipedia.org" there's simply no way to know whether this resource has actually moved to a new URL (which is the semantics of the HTTP response) or whether this is simply a special URL that I shouldn't share. Yes, some people might be familiar with the "m." subdomain for mobile-specific websites, but in general this sort of thing is (in my opinion) an abuse of HTTP redirects.

Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Monday December 06, 2021 @02:50PM (#29464675)
> Regardless of what type of device I'm using, I should be able to share the URL for that page to someone else regardless of what type of device they're using. The URL should literally be the uniform locator of that resource and shouldn't contain any semantics about any particular user agent's device.

As I just pointed out, and you somehow misunderstood, this is the exact behavior of the mobile page. It is not the behavior of the standard page. But sharing a link to the mobile page is bad, and sharing a link to the standard page is good. Keep this in mind when you're deciding how URLs should behave.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @02:59PM (#29464802)
I haven't misunderstood. I simply disagree. If I am on a public web page of a particular resource I should be able to share the URL to anyone else. Neither my user agent nor the other party's user agent should matter. It is ludicrous (and in fact essentially impossible) to check how a URL behaves in every possible user agent before sharing that URL with someone. If I'm on the Wikipedia page for London, I ought to be able to share that URL with anyone using any user agent. If I cannot do that, that is the responsibility of the web site administrators.
Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Monday December 06, 2021 @04:48PM (#29466145)
> If I am on a public web page of a particular resource I should be able to share the URL to anyone else. Neither my user agent nor the other party's user agent should matter.

This is how mobile wikipedia pages behave. What part of that do you disagree with?

Share a mobile page's URL and the person following your link will see the same page you do, no matter what your user-agent is, no matter what their user-agent is, no matter what device you're using, no matter what device they're using.

This is the problem. The behavior you are looking for, of different people seeing different content according to their user-agent, is also provided, and it's provided by the standard page.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @05:47PM (#29466730)
Again, the point is that the non-mobile URL redirects to the mobile URL. You're not "sharing a mobile page's URL," you're just sharing the URL for the page you're on. You didn't choose to be on a mobile-specific page. And again, your user agent does matter, because that's how you got to the mobile URL in the first place. Returning HTTP redirects is not supposed to mean "here's a new URL that's different from the one you requested, oh any by the way you can't share this new URL." An HTTP redirect is supposed to mean "the resource you requested is now at a new URL."
Re:Show HN: I made a modern web UI for Wikipedia by seppel on Wednesday December 08, 2021 @10:46AM (#29486126)
> Again, the point is that the non-mobile URL redirects to the mobile URL.

And I would argue that this is not only the point but the problem we are talking about. It makes the m. pages appear all over the Internet although they are less suitable for some devices (they are, I'd argue, even less usable because, e.g., the page history is missing when you are not logged in).

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @02:30PM (#29464423)
You're mistaken. Wikipedia automatically redirects you to the m. website if you type "en.wikipedia.org" into your phone browser. The same is true even if you explicitly type an article's URL into your phone browser, like "en.wikipedia.org/London". Google and Bing will also show mobile URLs in search results (although DuckDuckGo does not). The only way to see the actual desktop version is to click on the "Desktop" link at the very bottom of a mobile page, and even that just sets a cookie to prevent redirection back to the mobile site, so it doesn't work across multiple devices or private browsing sessions.
Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Monday December 06, 2021 @02:47PM (#29464626)
> You're mistaken. Wikipedia automatically redirects you to the m. website if you type "en.wikipedia.org" into your phone browser. The same is true even if you explicitly type an article's URL into your phone browser, like "en.wikipedia.org/London".

What am I mistaken about? This is exactly what I said happens. I focused this information pretty heavily:

>> The standard page will redirect mobile user-agents to the mobile page.

>> I am sympathetic to the view that the URL should just point wherever it points. This would require a change to Wikipedia's standard page so that it would display when requested on mobile instead of redirecting.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @02:54PM (#29464721)
You're mistaken that being on the "m." subdomain indicates that you have made some decision to do so, and that sharing that URL ought to send anyone to the mobile design. On the contrary, the entire point of a URL is for sharing a resource, and if a URL to a public resources is not shareable that is a mistake on the part of the web site, not a mistake on the part of the visitor. It's certainly not the case that "Everyone agrees that this is a bad thing for you to do." It's not a bad thing for you to do, it is precisely what you ought to do. As I explained elsewhere on the thread, one could just as easily argue that sharing the "desktop" URL is also inappropriate, because some people might want to see the "mobile" design even if they're on a desktop computer (because the "mobile" design is in fact responsive).
Re:Show HN: I made a modern web UI for Wikipedia by dkonofalski on Monday December 06, 2021 @07:16PM (#29467588)
I'm just jumping into this now but you're not really listening to what the parent is saying. You seem to be acknowledging their point but then ignoring what they're saying.

No one is talking about what should happen. They're saying that, as you've confirmed, m.* is a separate resource from en.* because they exist as 2 separate pages on wikipedia.org. On the en.* page, people on mobile are incorrectly redirected to m.* which it seems that everyone agrees shouldn't be the behavior. The opposite, m.* redirecting people on desktop, doesn't occur.

That means that your statement that "URLs should be for a specific resource" contradicts your other statement that "sharing that URL ought [not] to send anyone to the mobile design". If the mobile page is a separate resource, then sending someone a link to m.* should always load that resource (the mobile version) which seems to the be the opposite of what you're suggesting.

Additionally, there seems to be additional confusion because everyone is assuming that the page loaded at m.* is the same page as that loaded on en.* but that doesn't seem to be the case as the page isn't responsive. It's the same text content but the stylesheet and headers are different which, by web standards, is a separate resource.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @07:41PM (#29467785)
I understand all of that and still disagree with the claim that mobile readers should never share a Wikipedia URL containing on the "m." subdomain. I simply do not agree. They got to that URL probably without every explicitly asking for a mobile-specific page, so they ought to freely share that URL. Moreover, this "mobile" design is in fact more responsive than the "desktop" design, and some people might even prefer to always see the mobile design even when they are on a desktop computer. I think it's outlandish to say that mobile users should never share the URLs they are viewing simply because some (but not all!) desktop users might prefer the desktop design.
Re:Show HN: I made a modern web UI for Wikipedia by dkonofalski on Monday December 06, 2021 @08:57PM (#29468332)
No one is saying that mobile readers shouldn't ever share a URL on the "m." subdomain (despite them, quite literally, saying that). The criticism is that Wikipedia even has 2 separate resources for the same article and that the default behavior on "m." is to share the mobile resource while that's not the same case for the "en." subdomain (or other language variants). The only thing being said is that it should be consistent or it should be seamless - "en." always takes you to desktop and "m." always takes you to mobile or both should take you to the same page and the page should be responsive to the device you're using at the time. When users are saying "don't share the 'm.' page", they're only saying that because it doesn't exhibit the behavior of the "standard" page (which I'm only calling "standard" because that's how it was stated despite the fact that I don't agree that's a proper name for it).
Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Monday December 06, 2021 @09:38PM (#29468580)
I agree with criticism of Wikipedia’s behavior. I disagree that ordinary visitors to the website should need to or indeed should manually manipulate the URL of the page they’re on in order to share it with someone else. If you’re sharing the URL directly with a specific person who you know feels strongly about which URL they received, then sure, do it to be nice. But I disagree with prescribing that one URL should be the default (when it’s not even clear which one it should be!) and complaining about other people not respecting your preferred default URL.
Re:Show HN: I made a modern web UI for Wikipedia by dkonofalski on Tuesday December 07, 2021 @11:44AM (#29474747)
> I disagree that ordinary visitors to the website should need to or indeed should manually manipulate the URL of the page they’re on in order to share it with someone else.

Everyone agrees with you on this point. You shouldn't need to manually manipulate anything but, because Wikipedia keeps a desktop resource and a mobile resource, there is a distinction and so you do need to manually manipulate it if you're sending a link from mobile to someone else and don't know their device. That doesn't change the fact that sending a mobile URL should always show the mobile page because that is, in fact, a unique resource and, therefore, has a unique URL.

Re:Show HN: I made a modern web UI for Wikipedia by tshaddox on Tuesday December 07, 2021 @03:27PM (#29477775)
> because Wikipedia keeps a desktop resource and a mobile resource, there is a distinction and so you do need to manually manipulate it if you're sending a link from mobile to someone else and don't know their device.

As I've explained, even knowing their device is not sufficient, because someone on a desktop device may prefer the "mobile" design (which is responsive) or someone on a mobile device may prefer the desktop design (because it apparently contains more features). And if you're sharing the link with multiple people or publicly, you obviously can't accommodate mutually exclusive preferences.

Re:Show HN: I made a modern web UI for Wikipedia by dkonofalski on Tuesday December 07, 2021 @09:59PM (#29480809)
That wasn't my point, though. My point is that the mobile version and the desktop version are explicitly different resources. They do not load the same page. Therefore, they should have separate URLs. The very first parent comment stated that sending the "m." URL should load the mobile version of the page regardless of the device being used and they're correct. The fact that people are redirected there from the main URL is the problem, not the fact that they're sending the link to the mobile version since that's the "correct" behavior according to URL standards.
Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Tuesday December 07, 2021 @03:46PM (#29477997)
en.m. is NOT a seperate resource from en.. It is the SAME resource because it has the SAME content and because editing the content on EITHER changes the content on the other. It is a different PRESENTATION of the content, which should be served at the same URL. This is WHY HTTP has such headers as Vary and Accept.

If en.m. is asking for the mobile version, then en. is asking for the desktop version, yes? So why does en. redirect to en.m. on mobile?

Re:Show HN: I made a modern web UI for Wikipedia by thaumasiotes on Tuesday December 07, 2021 @07:29PM (#29480007)
So that mobile users following existing wikipedia links can view mobile pages instead.

It reflects the fact that standard pages existed before mobile pages did.

Re:Show HN: I made a modern web UI for Wikipedia by dkonofalski on Tuesday December 07, 2021 @10:00PM (#29480819)
That's not true. There are functional differences between the en.m and the en. versions.
Re:Show HN: I made a modern web UI for Wikipedia by jfrunyon on Friday December 10, 2021 @03:16PM (#29514957)
Okay, and? Again, they both display the same content, and edits made to either one affect the other. I don't know why you think it's relevant that there are (supposedly) "functional differences", sockpuppet.
Re:Show HN: I made a modern web UI for Wikipedia by dkonofalski on Monday December 13, 2021 @11:13AM (#29540906)
Sockpuppet? And who exactly would I be sockpuppeting for? Big Wiki?

It's relevant that there are functional differences because those are not presentational differences. HTML is for content, CSS is for presentation. If the HTML is different, then it's a different resource and, therefore, gets a different resource locator (URL).

Re:Show HN: I made a modern web UI for Wikipedia by pmontra on Monday December 06, 2021 @07:03PM (#29467502)
I always remove the m. from Wikipedia links when I share them somewhere that people can browse from the desktop (example HN). People tapping on that link on a phone will be redirected to the mobile version anyway. I don't remove the m. when I share on a messenger (example WhatsApp) when is somebody could receive the message on a desktop. I should probably always remove the m.