News for hackers. Stuff that matters.
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.