Wikipedia:Reference desk/Archives/Computing/2021 September 29
Computing desk | ||
---|---|---|
< September 28 | << Aug | September | Oct >> | Current desk > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
September 29
editDesktop site / mobile site
editWhat does the "desktop site" option in a mobile web browser actually set? I assume it sends some signal to the server. It's not setting the user-agent string (which is how Wikipedia decides which version of pages to serve). I'm trying to figure out how to get my mobile browser to show desktop versions by default, because the mobile "enhanced" experience is typically terrible, lacking navigational content or sidebar links, and I'm sick of selecting the menu option for desktop every time I open a new tab. Card Zero (talk) 09:54, 29 September 2021 (UTC)
- The first answer to this stackoverflow question says it is user-agent only, but the second, more recent answer says it has to do with viewport meta tags. This page probably contains the information you want somewhere but I am way out of my depth. TigraanClick here for my talk page ("private" contact) 10:08, 29 September 2021 (UTC)
- Wikimedia looks at the user agent to determine if you get redirected to the mobile site. —TheDJ (talk • contribs) 10:13, 29 September 2021 (UTC)
- MobileFrontend sets a cookie named
stopMobileRedirect
. https://gerrit.wikimedia.org/g/mediawiki/extensions/MobileFrontend/+/1f862168f73b51fa0593e3c7d1d51ee305d2d7fd/includes/MobileContext.php#494 Unfortunately this whole part isn't too well documented. —TheDJ (talk • contribs) 10:09, 29 September 2021 (UTC)- Thanks, but I assume that just relates to user-agent (as you say above). I'm talking about all the other sites on the web, which are using some mysterious means beyond my control to decide to serve me the mobile version. For instance w3.org, visited on a mobile browser, even with my user-agent string saying that I'm using a desktop machine, increases the size of the text by about 50%. This is a benign example, since at least none of the content is missing, but it's still unnecessary since I'm not partially sighted or looking at my phone from three feet away, and the text wraps in ugly ways. How are they doing the detection? It might just be down to some viewport metric, which I think the browser deliberately misreports (Javascript claims the width and height of the viewport in pixels is half the actual available number). Card Zero (talk) 10:32, 29 September 2021 (UTC)
- Yes that is likely just the viewport + media queries in CSS changing the styling. "Javascript claims the width and height of the viewport in pixels is half the actual available number" probably not, it's reporting in device independent pixels and likely you have a high density screen, so you need to take into account the density factor as well. (a 2x HiDPI screen of 640x480 will report as 320x240 device independent pixels to JS, with a 2x density). —TheDJ (talk • contribs) 11:18, 29 September 2021 (UTC)
- Chrome (in fact I'm using Kiwi) has a flag called "Request desktop site for tablets on Android", but it does nothing for me because it "Requests a desktop site, if the screen size is large enough". Evidently my 1600x700 screen is being considered as an 800x350 screen, whether I like it or not, and so it's not "large enough". One possibility is to write my own extension, but I can't find the "desktop site" setting in the API. I suppose the extension could do something with the viewport, but I'm not sure what. In fact is pixel density an attribute somewhere in the DOM that I can change? Maybe I could just make an extension to set it to 1x for every page. (Not that I have any experience of creating browser extensions, but it's definitely worth it to save a small amount of menu-selection effort for every new tab. Or more fun this way at least.) Card Zero (talk) 14:28, 29 September 2021 (UTC)
- It's increasingly common that websites do not serve you a different version based on what device they think you are using. Instead they use Responsive Web design so the browser automatically adjust what it's shows based on the view port size. You can test this on any site by adjusting the browser window size or zoom level on a desktop browser after the page has loaded. While it is theoretically possible a site may download something else when you do so AFAIK this is rare with the exception of different images sizes etc. You can disable the network adapter to confirm. Nil Einne (talk) 22:39, 30 September 2021 (UTC)
- Chrome (in fact I'm using Kiwi) has a flag called "Request desktop site for tablets on Android", but it does nothing for me because it "Requests a desktop site, if the screen size is large enough". Evidently my 1600x700 screen is being considered as an 800x350 screen, whether I like it or not, and so it's not "large enough". One possibility is to write my own extension, but I can't find the "desktop site" setting in the API. I suppose the extension could do something with the viewport, but I'm not sure what. In fact is pixel density an attribute somewhere in the DOM that I can change? Maybe I could just make an extension to set it to 1x for every page. (Not that I have any experience of creating browser extensions, but it's definitely worth it to save a small amount of menu-selection effort for every new tab. Or more fun this way at least.) Card Zero (talk) 14:28, 29 September 2021 (UTC)
- Yes that is likely just the viewport + media queries in CSS changing the styling. "Javascript claims the width and height of the viewport in pixels is half the actual available number" probably not, it's reporting in device independent pixels and likely you have a high density screen, so you need to take into account the density factor as well. (a 2x HiDPI screen of 640x480 will report as 320x240 device independent pixels to JS, with a 2x density). —TheDJ (talk • contribs) 11:18, 29 September 2021 (UTC)
- Thanks, but I assume that just relates to user-agent (as you say above). I'm talking about all the other sites on the web, which are using some mysterious means beyond my control to decide to serve me the mobile version. For instance w3.org, visited on a mobile browser, even with my user-agent string saying that I'm using a desktop machine, increases the size of the text by about 50%. This is a benign example, since at least none of the content is missing, but it's still unnecessary since I'm not partially sighted or looking at my phone from three feet away, and the text wraps in ugly ways. How are they doing the detection? It might just be down to some viewport metric, which I think the browser deliberately misreports (Javascript claims the width and height of the viewport in pixels is half the actual available number). Card Zero (talk) 10:32, 29 September 2021 (UTC)
Difference between OLED and LCD Switch kickstands
editHello! So I'm wondering, what makes the OLED Switch's kickstand so much better compared to the LCD Switch's kickstand. I think it has something to do with the size, however I wonder if there's more to it, mainly what makes the LCD Switch's kickstand so bad at doing the one thing it was designed for, keeping the Switch propped up. Also, do we know how the OLED Switch's kickstand works yet, because I'm wondering how it managed to stay in specific positions without falling down. ― Blaze The WolfTalkBlaze Wolf#6545 18:10, 29 September 2021 (UTC)
- This list of problems with the Switch says that the old stand is deliberately made from cheap and flimsy plastic so that it can snap off (and slot back on) if you crush it against the dock. This review from the sources on the switch page says the new stand will be "wide" and "adjustable". This super-sturdy third-party stand is undoubtedly more stable, but perhaps over-compensating for the flimsiness problem.
- On the same Video Games Chronicle site I found an unboxing video which lets you see the stand in still close-up images, between 6 and 7 minutes into the video. It's as wide as the Switch. It's not obvious how the hinges work but they must stick in position somehow. I'd be guessing if I said "friction", but what's the question here, how else could it work? I suppose it may or may not have preset positions. Card Zero (talk) 18:56, 29 September 2021 (UTC)
- That makes sense, although I do wish they would've made it sturdier (possibly by having stands on both sides) so that it doesn't snap off when you're trying to actually use it as a kickstand. ― Blaze The WolfTalkBlaze Wolf#6545 13:01, 30 September 2021 (UTC)