Re:Why Prefetch Is Broken
by labster on Wednesday June 02, 2021 @09:23AM
(#27368366)
Prefetching is a cool idea but a lot of us can’t actually use it. I tried implementing prefetch in a personal project only to find out uBlock Origin is disabling it. Apparently prefetched resources aren’t filtered by extensions, which kind of defeats tracking protection. So I can’t even use it for my own project, as I’d rather avoid the trackers. I assume many people are using the same default setting here.
[ Parent
| on HN ]
> I tried implementing prefetch in a personal project only to find out uBlock Origin is disabling it.
That seems fine to me. Implement it and if the users don't want it then it doesn't occur. You should still code as if it works.
> Apparently prefetched resources aren’t filtered by extensions
This sounds like a browser bug. It should probably be raised against the browsers.
> as I’d rather avoid the trackers.
Again, this is just a result of the browser bug. I see no reason to throw away a nice declarative prefetch simply because browsers forgot to allow filtering.
>That seems fine to me. Implement it and if the users don't want it then it doesn't occur. You should still code as if it works.
Please correct me if I'm misinterpreting this statement. Are you saying it is acceptable if the code breaks if prefetch fails?
Re:Why Prefetch Is Broken
by ninjapenguin54 on Wednesday June 02, 2021 @10:46AM
(#27369294)
How would the absence of a prefetch break something?
Isn't this just a performance optimization?
I take the original statement to mean that worse case scenario is extra time to load.
Yes, that is what I meant. You may as well include the prefetch. And if the browser (or the user) doesn't want the prefetch they just get a slower load. If the user enables them the get the snappier experience.