News for hackers. Stuff that matters.
Re:Browsers barely care what HTTP status code your web pages... by NoZebra120vClip on Friday August 11, 2023 @02:18AM (#37085666)
The web today is full of silent failures. I've noticed this all the time at work and in my personal business. If loading some resource runs into trouble, it's simply not feasible for the Node.js or React or PHP to surface an error to the user.

Chris says that the loading of sub-resources is a different matter. Well, the most common silent failure I have is not due to status codes per se, but because of my DNS-based adblocker, many sub-resources fail to load (GET or POST) with a network error (TCP RST). Unless a blocked domain corresponds to the front page I visit in a URL, the unavailable resource represents a silent failure, and I have foolishly contacted Support desks multiple times because my own use of the adblocker caused a silent failure that was difficult to diagnose.

In fact, I now have no way of knowing what web apps are like without an adblocker. Because all my devices use the same configuration, and it's non-trivial to disable it, I simply don't know what I am missing. Indeed, in the case of one web app which I've used as a PWA, it was simply missing features that I knew should have been there, and whitelisting enough domain names caused those features to re-appear.

I will just leave you with the most adorable 404 page anyone has ever seen: https://diopitt.org/pray/amen

Re:Browsers barely care what HTTP status code your web pages... by oneeyedpigeon on Friday August 11, 2023 @03:37AM (#37086114)
You'd like to think that the owners of those sites would fix them. A site shouldn't just not work if it can't access a certain JavaScript file - it should at least warn you of the problem.
Re:Browsers barely care what HTTP status code your web pages... by mjan22640 on Friday August 11, 2023 @03:38AM (#37086125)
What dns adblock do you use?
Re:Browsers barely care what HTTP status code your web pages... by namtab00 on Friday August 11, 2023 @04:50AM (#37086512)
not OP

pihole as cache, with the router as its upstream, with NextDNS as the router's dns server

Re:Browsers barely care what HTTP status code your web pages... by OJFord on Friday August 11, 2023 @06:19AM (#37087019)
What's the point of the PiHole in that setup? If the router doesn't have the storage for as large a cache you're still only using the dnsmasq part of PiHole by the sounds of it? (Not to mention most consumer routers support USB mass storage?)
Re:Browsers barely care what HTTP status code your web pages... by NoZebra120vClip on Friday August 11, 2023 @09:53AM (#37088698)
NextDNS.

They have a feature where if you're a free user, and you exceed your query quota for the month, they turn off all features and it acts like a normal resolver.

For some reason, there is no access to such a setting to do it manually, and I am a subscriber now, too.

There are profiles that can be configured separately, but even just to activate an alternate profile, one must reconfigure the DNS settings on the devices.

Re:Browsers barely care what HTTP status code your web pages... by bhelkey on Friday August 11, 2023 @03:42AM (#37086145)
> Unless a blocked domain corresponds to the front page I visit in a URL, the unavailable resource represents a silent failure

Is this not intended behavior? Were you not expecting ads to be silently removed?

Re:Browsers barely care what HTTP status code your web pages... by sclu1034 on Friday August 11, 2023 @04:10AM (#37086279)
From the user's point of view, yes, that is intended behavior. But the browser can't know that, all it sees is a dropped connection. For all it knows, there could be an actual issue with the network.

But unless you open the dev tools' network tab, you don't know about that request failing.

Re:Browsers barely care what HTTP status code your web pages... by NoZebra120vClip on Friday August 11, 2023 @06:35AM (#37087119)
TCP RST is indeed considered a transient failure, and the RFCs specify that it should be retried several times before giving up.

My ad blocker returns "0.0.0.0" for A records, which in practice means attempts to connect to 127.0.0.1, which isn't running a server of any kind on port 443/tcp or 80/tcp. So a standards-compliant client would really hang awhile, or hold rendering, until several connects have been attempted and they all failed.

Re:Browsers barely care what HTTP status code your web pages... by radicalism on Friday August 11, 2023 @04:25AM (#37086358)
> I will just leave you with the most adorable 404 page anyone has ever seen: https://diopitt.org/pray/amen

In the context of your comment, I was amused by how my own ad-blocker failed to properly show the (image on the) 404 page, since it is loaded from a different domain :D

Re:Browsers barely care what HTTP status code your web pages... by daveidol on Friday August 11, 2023 @04:56AM (#37086563)
> Because all my devices use the same configuration, and it's non-trivial to disable it

This is exactly why I do not use a DNS-based ad blocking solution (it’s trivial to disable uBlock Origin and refresh if something feels broken).

Re:Browsers barely care what HTTP status code your web pages... by IggleSniggle on Friday August 11, 2023 @07:47AM (#37087592)
This is why I run my DNS-based ad blocking solution through a VPS. It's trivial to toggle the VPN on/off on desktop or mobile. On desktop I have a single key to swap my network. On mobile, a gesture followed by two taps does the same.
Re:Browsers barely care what HTTP status code your web pages... by jondwillis on Friday August 11, 2023 @11:12AM (#37089601)
I’m not sure if we are talking about PiHole here, but I just log into the web interface and whitelist or temporarily disable blocking. Not as trivial as a browser extension, but still quite easy and fast.
Re:Browsers barely care what HTTP status code your web pages... by kaoD on Friday August 11, 2023 @05:11AM (#37086643)
> If loading some resource runs into trouble, it's simply not feasible for the Node.js or React or PHP to surface an error to the user.

In what way? Do you mean not feasible or just lazily coded?

Re:Browsers barely care what HTTP status code your web pages... by methodical on Friday August 11, 2023 @12:40PM (#37090702)
Also was confused by this sentence. I have worked on several Node, React, and even PHP (albeit a long time ago!) applications, and every single one of them caught and surfaced internal server errors. Never was aware there were actually people out there regardless of language who weren't catching and surfacing 500s in a straightforward fashion to the user.
Re:Browsers barely care what HTTP status code your web pages... by account42 on Friday August 11, 2023 @07:08AM (#37087309)
Browsers used to display an icon and beveled borders to indicate broken images. Not sure when they stopped but I wish they hadn't.
Re:Browsers barely care what HTTP status code your web pages... by nullindividual on Friday August 11, 2023 @12:46PM (#37090788)
They still do. The problem is, as always, JavaScript and how the assets are loaded and images rendered on pages.
Re:Browsers barely care what HTTP status code your web pages... by dredmorbius on Friday August 11, 2023 @07:51AM (#37087618)
"The Web is an error condition": <http://deirdre.net/programming-sucks-why-i-quit/>

See also Richard I. Cook's "How Complex Systems Fail": <https://how.complexsystems.fail/>

(Latter is an HN perennial, with 55 sumbissions presently: <https://hn.algolia.com/?q=how%20complex%20systems%20fail>. Most recent 10 months ago, so not quite ready for a re-up: <https://news.ycombinator.com/item?id=32895812>.)

Re:Browsers barely care what HTTP status code your web pages... by lcnPylGDnU4H9OF on Friday August 11, 2023 @01:32PM (#37091392)
The first one is a 404. I love the irony of there being an error condition in this case of a missing redirect.

https://deirdre.net/2014/programming-sucks-why-i-quit/

Re:Browsers barely care what HTTP status code your web pages... by dredmorbius on Saturday August 12, 2023 @01:22AM (#37097272)
I was being lazy and had copied the URL from an earlier comment of mine mentioning it.

The Internet Archive has a copy as well: <https://web.archive.org/web/20200922230737/https://deirdre.n...>

Re:Browsers barely care what HTTP status code your web pages... by lcnPylGDnU4H9OF on Saturday August 12, 2023 @09:58AM (#37100239)
Even their blog has such dead links. I just happened to notice that other URLs included the year, so I tracked that one down to see if that’s all what was needed.

Of course, forgetting about that little backwards compatibility is easy, especially considering it’s a personal blog and they likely have other personal things to worry about. I was just amused by the irony in context. I otherwise appreciated the read. :)

Re:Browsers barely care what HTTP status code your web pages... by dredmorbius on Saturday August 12, 2023 @04:02PM (#37103735)
If you happen to remember any of those, drop her a line. I'm pretty sure Deirdre's fairly meticulous about that sort of thing.
Re:Browsers barely care what HTTP status code your web pages... by lcnPylGDnU4H9OF on Monday August 14, 2023 @11:10PM (#37129717)
I should be able to find it. It was an aggregate post from 2014 titled something like “stuff I wrote this year” which is how I found the year for the post in question.