Hacker News new | ask | show | jobs
by drusepth 1917 days ago
HN is one of the few sites I always keep zoomed-in (around 200%), which led to me finding an interesting bug in Chrome while HN was down: Chrome's internal "This site can't be reached" page uses the zoom level of the site you would be visiting (if it were up), rather than Chrome's default zoom.

Screenshot: https://i.imgur.com/VwFtgQh.png

14 comments

Chrome used to store 'zoom level' for URLs even if you were in incognito mode: and in plain text. Not sure if it still does.... (if you changed the zoom level for a site while in incognito from the default, it would save the value and the associated URL).
not anymore. it does it the other way 'round though, which can be frustrating.
Whew. That gives the site extra bits of information to connect you to your real identity/account.
I'm incognito for a reason. I don't need to be followed all over, i'm a big boy, i can log in without any help.
I noticed the same behavior in Firefox as well. I wouldn't consider this as a bug though
It would be cool if zooming in / out on the T-Rex game caused it to switch your character to larger / smaller dinosaurs.
The Trex game really needs a meteor animation when the connection is re-established.
They even have the artwork! It's used when the game is disabled by ~~fun-hating sysadmins~~ enterprise policy.
Give this man a PM role at Google Chrome!
Only if he promises to discontinue the game in a year
what can you possibly not like about the dinosaur game?? I love it and i like how chrome has debugged it over the years.
I believe this is a joke about Google's penchant for discontinuing beloved products -- https://killedbygoogle.com/
So, the meteor hits the Trex, and its game over because you need to get back to work?
what's the t-rex game?
We have a version of it we adapted so that the t-rex has to jump over npm packages as they're being published in real-time!

https://www.onegraph.com/docs/subscriptions.html (it'll load in at the top of the page)

minigame built into chrome you can play when you're offline, or alternatively go to chrome://dino
Edge has one too at edge://surf
There's also an extracted version of it on Github for those of us who use Firefox.
You’re one of today’s lucky 10,000!
Don't know what today's lucky 10,000 is? You are also one of today's lucky 10,000! https://xkcd.com/1053/
hit space bar when offline in chrome, ps: addictive.
Game you get when the network is unavailable in chrome
Firefox does the same, as I discovered - I don't know whether it's a bug or intended functionality.

(As an aside, I keep HN at 150% and old reddit at 120% - those are the only 2 sites I have permanently zoomed)

Either a bug or an over-eager member of the Mozilla UX team had actually filed a bug with a feature-parity Chrome tag on it in BMO.
Bug-parity. Not even odd parity.
You could say I punted.
It's part of the charm. Unusable on retina without zooming (at least with my eyes).
I've observed a related issue with much amusement for a few years now: when loading a new resource (specifically: spinner going anticlockwise, waiting for TTFB), Chrome will invisibly switch the renderer over to the font size settings of the to-be-loaded resource, then carefully inhibit repainting the view.

But, if said destination resource is very slow to hit TTFB, you switch to a different tab, then back to the loading tab, you'll see the current page at the destination page's zoom settings.

My guess is that the interstitial system that injects error pages, Safe Browsing warnings, etc, doesn't hit the code path that says "we loaded a new (regular) page, go find its zoom settings".

Demo/PoC:

1. Run $anything that will serve a webpage on an arbitrary port - even an error page or directory listing. eg, python3 -m http.server, php -S 0:8000, etc.

2. Open the resource you just set up in a new tab, zoom in or out as preferred (eg, to a crazy level), copy the URL (for convenience), then close the tab.

3. Stop the server in (1), then run `nc -lp 8000` (or netcat, ncat, or $anything that will listen but never respond).

4. Open a new tab, navigate to a valid website (eg here :), example.com, etc), then once it's loaded, paste the URL you copied. With the page spinning and waiting for netcat (et al), navigate away from the tab, then back to it again.

Think I noticed this for the first time a couple years ago. Seems harmless enough.

Is that really a bug?
Feels like it to me. I'd expect the zoom to be associated with the site.

Granted, I am probably importing old thoughts of it being a sort of user provided style sheet.

It'd make the zoom level you see jump up and down depending on whether you lose your connection or regain it, this is less jarring.

You could say that Chrome is designed to tie the zoom level to the viewport but I wouldn't count on this behavior springing up from an underlying design and implementation rather than it being a design choice for the user experience.

I'm not sure I follow. If the page is constantly bouncing to the no connection page, it is jarring, period. If the page of my "no connection" changes because of the address in trying, that is jarring if the problem is on my end.

That is, consider your network is down. You try to go to an address. It doesn't load, so you try another address, the page changes; but it is the same content.

Is it important that the no connection message be an HTML document treated like others in the web browser? If browsers used to model it that way and you saw behaviors corresponding to the switching of a webpage, it was arbitrary too, and in this case, would cause more disruption.
> I'd expect the zoom to be associated with the site.

That's what the GP comment said happened: the zoom level was the one associated with what they previously had set on HN, and they expected it to be the opposite, the default zoom level for the browser.

But the site didn't load. My browser's not loading page did.

Is easier to see as broken by thinking of "how could I set it so that my browser's error page has a default zoom?"

But your browser's connection-failure page is considered to come from the HTTP Origin of the site. It's like when browsers receive a specific HTTP status-code (e.g. 500) with no body, so they render a default HTML error document.

In both cases, those are the browser supplying a resource representation, while still technically being on the resource specified in the navigation bar. The thing you're seeing is an overridden representation of the server's response. (Which, in this case, just happened to be "no response.")

It's almost exactly the same as how the server sending a 304 gets the browser to load the document from cache. The server's actual response was a 304; but the browser's representation of that response is the cached HTML DOM it had laying around from the last 2xx resource-representation it received "about" the same resource.

I mean, I get the argument. But it falls easily, from my pov. If the styling is for all content from the target site, 304 still works logically. If the argument is "all content in the browser", it fails as it depends on the address.

And I can see the argument for either. If I increase my terminal's font and run a curl, the response is scaled up. That makes sense, I scaled up my terminal.

To that end, it is odd that scalling up is per document origin. I'm assuming that is configurable?

I would consider the browser's built-in page for "I couldn't load news.ycombinator.com" to be a separate site from "news.ycombinator.com".
I think the zoom level for Chrome is global per window at the least, it's definitely not per tab.
it's per subdomain i think.
oh indeed it is, wow that's subtle, always escaped me where the focused setting applied. In that case yah probably a bug.
FWIW Safari doesn't have this bug (I too keep HN zoomed at 200% for some reason).
Glad to hear I'm not alone in this. Currently at 133%, so not quite as extreme.

Judging from the responses, this is actually a lot more popular than I assumed.

Which begs the question: Does anyone feel the default font is just perfect and wouldn't want it to be bigger even by a tiny bit?

I think, the font size around 105-110% would be perfect but the default one is fine as well. It definitely is the smallest default font I've seen on a popular website but it's workable for me.
> Which begs the question: Does anyone feel the default font is just perfect and wouldn't want it to be bigger even by a tiny bit?

I think it's perfect. What is your screen DPI (or rather angular pixel size from your normal viewing position) and is your browser set up to do any scaling based on that? Maybe it should be.

I really dislike the trend of giant fonts and whitespace.

Same, I don't understand why the font is so small by default. Just use the default browser font size I've defined as a user!
Same with Firefox. I have HN at 190%, and got startled by the error message being so. big. and. weird.
I had to check my own zoom, 200% as well.
The "View page source" pages too.
The font-size on HN is barely readable, I'm working on an accessible skin for the HN frontend that addresses this.

I'm targeting WCAG 2.0. Keep an eye out for the "Show HN" coming soon!

Are you using a high dpi monitor but not using > 100% display scaling in your OS or something? It's roughly the same size as most other sites for me.

(And pretty much all browsers have a zoom function for exactly this, it feels like a totally separate frontend would be more hassle to use than just ctrl + scroll wheel once)

I’ve come to enjoy using a high DPI monitor without display scaling as a way to counteract the huge amount of whitespace in modern UIs, coupled with content zooming so words are still actually readable :) https://addons.mozilla.org/en-US/firefox/addon/zoom-page-we/
As a designer, I've been thinking a lot about this "huge amount of whitespace in modern UIs" thing. I personally hate it, I want most things to be always in reach.

Two of my hypotheses are:

(1) some designers are working on huge screens themselves, and don't test enough in usual resolutions

(2) it's easier to achieve good visual composition by doing a lot of whitespace (to the expense of hiding things below fold or in triggerable containers)

It's the only site I have problems with, tbh. Stylesheet says it's supposed to be 10pt (with comment text dropping down to 9pt), which is even smaller than the too-small 12pt font that gets recommended a lot.
On Win10 with default settings, fonts on most sites are totally comfortable to me.

HN is readable - just - but it's definitely on the small side.

The complete lack of some sort of horizontal constraint doesn't help either. 200 character lines are no bueno for reading.

I've found Linux to handle scaling pretty inconsistently; I've got a 4K television I connect my computer to and if I tell it to scale 200% in the monitor configuration most things get scaled nicely, but random stuff (especially proprietary stuff) doesn't know what to do.

It worked much better to just tell it to output 1080p and let my television scale it... less graphics memory too. I still need to scale HN up relative to other sites in order to read it though.

If I compare the text of your comment to the text of an article on npr.org it seems like about the same as the difference between 9pt and 12pt, and they are using a serif font that seems to be a lot easier to read.

It's a style choice I guess? It seems like it would work best on a large 1080p display, so maybe that's just what the person who designed the layout was using.

No I'm not. The font-size for most text on the site is 10pt and 9pt.

Zoom doesn't fix line lengths of 1500 characters and terrible color contrast.

The link to the site guidelines is 7pt with a contrast that fails WCAG 2.0. No wonder no one reads them.

> Zoom doesn't fix line lengths of 1500 characters

That depends on your browsers zoom implementation. Firefox is able to zoom the text/element sizes while keeping the page width the same on HN.

While you are there, can I feature request that bring the upvote icon/button to end of the comment? Right now that triangle is at the beginning of comment, sometimes a comment is long & interesting,I want to upvote it because its relevant, interesting & correct, have to scroll back up.
I consider that a feature, not a bug. I typically do all browsing zoomed in somewhat and I expect the "page can't load" to also be zoomed. Or am I misunderstanding what you're saying?

EDIT: People who disagree, care to explain? I zoomed in, so why would I expect it to zoom out just because its a different page? What am I missing?