News for hackers. Stuff that matters.
Re:Firefox 85 cracks down on supercookies by abcd_f on Tuesday January 26, 2021 @11:29AM (#25917696)
Per-site caching negates the principal selling point of centrally-hosted JS and resources, including fonts. The convenience remains, but all speed-related perks (due to the resources being reused from earlier visits to unrelated sites) are no more... which is actually great, because it reduces the value that unscrupulous free CDN providers can derive from their "properties".

It also means that I can remove fonts.google.com from the uBlock blacklist. Yay.

Re:Firefox 85 cracks down on supercookies by PaulHoule on Tuesday January 26, 2021 @11:54AM (#25918089)
That idea of having JS files hosted elsewhere always struck me as a Girardian scam (e.g. "everybody else does it") and always getting voted down when I showed people the reality factor.

Nobody seemed to think it was hard to host a file before this came along, just as nobody thought it was hard to have a blog before Medium.

Of course this creates the apocalyptic possibility that one of these servers could get hacked (later addressed with some signing) but it's also not easy to say you're really improving the performance of something if there is any possibility you'll need to do an additional DNS lookup -- one of the greatest "long tails" in performance. You might improve median performance, but people don't 'experience' median performance in most cases (it goes by too fast for them to actually experience it), they 'experience' the 5% of requests that are the 95% worst, and if they make 100 requests to do a task, 5 of them will go bad.

People are miseducated to think caching is always a slam dunk and sometimes it is but often it is more nuanced, something you see in CPU design where you might "build the best system you can that doesn't cache" (and doesn't have the complexity, power and transistor count from the cache -- like Atmel AVR8) to quite a bit of tradeoff when it comes to 'computing power' vs 'electrical power' and also multiple cores that see a consistent or not view of memory.

Re:Firefox 85 cracks down on supercookies by crazygringo on Tuesday January 26, 2021 @08:20PM (#25923103)
> Nobody seemed to think it was hard to host a file before this came along, just as nobody thought it was hard to have a blog before Medium.

Huh? Who ever said the main point of a CDN is to make things easier? It's always been in order to provide a faster end-user experience.

> ...but it's also not easy to say you're really improving the performance of something if there is any possibility you'll need to do an additional DNS lookup -- one of the greatest "long tails" in performance.

But common CDN's will virtually already have their IP address cached while you're browsing anyways.

Caching certainly has nuance to it as you say, but I think you're being particularly ungenerous in claiming that CDN's are a scam and that you're representing "reality".

Businesses measure these things in reality with analytics, and they also almost always analyze the worst 5% or 1% of requests as well, not just the "median".

CDN's are a big boost to performance in many cases. Or at least, until now (for shared files). You shouldn't be so dismissive.

Re:Firefox 85 cracks down on supercookies by gamacodre on Tuesday January 26, 2021 @02:04PM (#25919831)
This. If you are loading some scripts that are actually required for your app or page to work right, why would you get them from someone else's infrastructure? Terminal laziness? Or is the assumption that XYZ corp has more incentive than you do to keep your page working? This never made much sense to me except for developer toys & tutorials.
Re:Firefox 85 cracks down on supercookies by jimmydorry on Tuesday January 26, 2021 @06:24PM (#25922254)
It makes sense from a $$ and resource usage stand point. I have to assume the best here and believe that the people arguing on there being no merit to CDN hosting of shared libraries all forgetting the two most important things a business must consider.

Every byte sent will cost the business. If you can save that 2MB per user per cache life, you pay that much less on the internet bill for your hosting.

Every byte sent uses up some of your limited bandwidth while it is being sent. If your site is 10KB and you rely on 2MB of javascript libraries and fonts, offloading that 2MB is quite a significant reduction is resource usage.

These above two views seem vastly more important than terminal laziness, up-time management, etc.

Re:Firefox 85 cracks down on supercookies by DaiPlusPlus on Tuesday January 26, 2021 @07:57PM (#25922939)
> If you can save that 2MB per user per cache life, you pay that much less on the internet bill for your hosting

Ah yes - I remember those _dark days_ of being a shared webhosting customer over a decade ago and stressing about breaking my 500GB/mo data transfer limit.

Today, Azure's outbound data costs on the order of $0.08/GB, so 1MB is $0.000078125, so the cost of 2MB of JS is $0.00015625.

Supposing you have one million new visitors every month (i.e. nothing's cached at their end so they'll download the full 2MB) - those one million visitors will cost you $156.25 in data-transfer.

Compare that to the immediate cost to the business of paying their SWEs and SREs to trim down the site's resources to a more realistic few-hundred-KB, supposing that's a good 2-3 week project for 3-4 people - assuming a W/Best Coast company, that's ( $250k / 52 ) * 3 * 4 == $57,000.

From looking at those numbers, there is absolutely no business case in optimizing web content - it's now significantly cheaper (on paper) to have a crappy UX and slow load-times than it is to fix it.

Re:Firefox 85 cracks down on supercookies by bigiain on Tuesday January 26, 2021 @06:47PM (#25922436)
> If your site is 10KB and you rely on 2MB of javascript libraries and fonts,

... then you're doin' it wrong.

Re:Firefox 85 cracks down on supercookies by dozzman on Tuesday January 26, 2021 @07:38PM (#25922819)
> ... then you're doin' it wrong.

100%. Its mind blowing that this could possibly be considered without batting an eyelid.

Re:Firefox 85 cracks down on supercookies by mdavidn on Tuesday January 26, 2021 @12:32PM (#25918695)
Browsers can check "subresource integrity" to guard against hacks of third-party services.

https://developer.mozilla.org/en-US/docs/Web/Security/Subres...

Re:Firefox 85 cracks down on supercookies by nunez on Tuesday January 26, 2021 @09:02PM (#25923390)
Yeah but you, the developer, need to provide the hash of the script being downloaded, work that’s easy to miss.
Re:Firefox 85 cracks down on supercookies by samus on Wednesday January 27, 2021 @05:01AM (#25926283)
In case the hash is provided, caching across websites could be turned on again, to avoid the possibility of it being used as a supercookie. The website would have to know the hash of the supercookie before loading the resource. Except if a candidate set of possible users can reasonably be downloaded to the client, maybe sorted by time of last access and proximity to the geo location of the IP address of the last access...
Re:Firefox 85 cracks down on supercookies by namibj on Wednesday January 27, 2021 @08:08AM (#25927737)
Yes. Pretty much.
Re:Firefox 85 cracks down on supercookies by sanxiyn on Tuesday January 26, 2021 @11:58AM (#25918179)
It's not about being hard, it's about being convenient. Convenience is important. Even trivial convenience.
Re:Firefox 85 cracks down on supercookies by conradfr on Tuesday January 26, 2021 @03:44PM (#25920819)
Wasn't that also because before http2 browsers were limiting the number of concurrent requests to a domain?
Re:Firefox 85 cracks down on supercookies by Zardoz84 on Wednesday January 27, 2021 @01:31AM (#25924991)
We at some point, we where retrieving some javascript (jQuery) and fonts dependencies from a CDN. At the end, we need that change and include all in out web application as we saw all kind of problems... Like that someone trying to use behind a intranet or not working fine when it's accessed a develop version behind a weird VPN. Or that funny moment when a CDN get down and simultaneously a lot of our webs get half broken.
Re:Firefox 85 cracks down on supercookies by cactus2093 on Tuesday January 26, 2021 @12:24PM (#25918575)
It doesn't seem like centrally-hosted resources ever centralized enough to be all that useful. Even for sites that are trying to play ball, there are multiple CDNs so everyone has to agree which one is the standard. Plus everyone has to be using the same version of each resource, but in practice most js tools release so often that there will always be many different versions out in the wild.

On top of that a lot of the modern frontend tools and best practices are pushing in the other direction. Out of the box, tools like webpack will bundle up all your dependecies with your app code. The lack of JS namespacing and desire to avoid globals (which is pretty well-intentioned, and generally good advice) means that your linter complains when you just drop in a script tag to pull a library from a cdn instead of using an es6 import and letting your bundler handle it. Typescript won't work out of the box I don't think. Your integration tests will fail if the cdn is down or you have a network hiccup, as opposed to serving files locally in your test suite. And on and on. This is just anecdotal, but I haven't seen most teams I've worked with value the idea of centrally-hosted JS enough to work around all these obstacles.

Re:Firefox 85 cracks down on supercookies by dathinab on Tuesday January 26, 2021 @05:28PM (#25921793)
> Per-site caching negates the principal selling point of centrally-hosted JS and resources

It doesn't or more correctly the benefit wasn't really a think in most cases.

I will not start the discussion her again but on previous hacker news articles about this topic you will find very extensive discussions about how in practice the caches often didn't work out well for all kinds of reasons and how you still have a per-domain cache so it anyway mainly matters the first time you visit a domain but not later times and how the JS ecosystem is super fragmented even if it's about the same library etc. etc.

> cause it reduces the value that unscrupulous free CDN providers can derive from their "properties".

Not really, the value of a CDN is to serve content to the user from a "close by" node in a reliable way allowing you to focus on the non static parts of your site (wrt. to traffic balancing and similar).

Shared caches technically never did matter that much wrt. CDN's (but people used it IMHO wrongly as selling point).

Re:Firefox 85 cracks down on supercookies by dcposch on Tuesday January 26, 2021 @06:01PM (#25922059)
Plus, FF can preserve the value by allowing cross domain resource caching as long as the request specifies a hash.

That negates the super cookie use case, but still lets you eg. load Jquery from a shared CDN.

You get a free security upgrade to go with it.

Re:Firefox 85 cracks down on supercookies by dathinab on Tuesday January 26, 2021 @09:44PM (#25923642)
> Plus, FF can preserve the value by allowing cross domain resource caching as long as the request specifies a hash.

This does not work as you still can have the same timing attacks the hash only helps wrt. source integrity from CDN's but not with chach based time attacks.

Still what should be possible without timing attack channels is to de-duplicate the storage of resources (through not easy and likely not worth it for most use-cases). So you will only lose the most times small speed post on the load time when you open a domain the first time.

Re:Firefox 85 cracks down on supercookies by ogre_codes on Tuesday January 26, 2021 @01:19PM (#25919320)
> It also means that I can remove fonts.google.com from the uBlock blacklist. Yay.

If you are downloading fonts from Google, Google harvests your IP and likely the referring site from the request. Even if your browser doesn't sent the referrer, many sites have a unique enough font-fingerprint that Google can figure out where you are.

Re:Firefox 85 cracks down on supercookies by aarchi on Wednesday January 27, 2021 @12:54AM (#25924792)
Would this bypass most Google Font tracking? An extension that makes Google Font requests on behalf of the requesting site and caches the response indefinitely and for all sites, somewhat like LocalCDN/Decentraleyes, but on demand.
Re:Firefox 85 cracks down on supercookies by ogre_codes on Wednesday January 27, 2021 @01:07AM (#25924853)
That would prevent Google from getting every request.

FWIW, I'm not sure how much of an issue this even is. My comment was a hypothetical. Sadly the way Google/ Facebook/ etc operate, I just assume that whatever I think of, they've already done it plus 1000s of other things which would never occur to me.

Re:Firefox 85 cracks down on supercookies by jahewson on Tuesday January 26, 2021 @12:09PM (#25918335)
Per-site caching is the new norm. Shared caches are vulnerable to timing attacks that infer your web history. It’s a shame but that’s just the reality of caching. Shared caches were never as useful as claimed due to the large numbers of versions of most resources.
Re:Firefox 85 cracks down on supercookies by kristofferR on Tuesday January 26, 2021 @11:32AM (#25917760)
LocalCDN is an extension I would recommend, both for privacy and performance reasons.

https://www.localcdn.org/

Re:Firefox 85 cracks down on supercookies by milofeynman on Tuesday January 26, 2021 @11:40AM (#25917882)
Decentraleyes is what I use. I assume they're similar https://addons.mozilla.org/en-US/firefox/addon/decentraleyes...
Re:Firefox 85 cracks down on supercookies by kristofferR on Tuesday January 26, 2021 @01:33PM (#25919465)
LocalCDN is an updated fork of Decentraleyes.

Decentraleyes hasn't been updated in ages, has few assets and its assets are massively out of date.

https://git.synz.io/Synzvato/decentraleyes/-/tree/master/res...

vs

https://codeberg.org/nobody/LocalCDN/src/branch/main/resourc...

Re:Firefox 85 cracks down on supercookies by takeda on Tuesday January 26, 2021 @05:57PM (#25922025)
My Decentraleyes was updated in November 5th, that's not that long ago. LocalCDN extension has also a comment that Mozilla doesn't regularly monitor it for security.
Re:Firefox 85 cracks down on supercookies by Forbo on Tuesday January 26, 2021 @08:12PM (#25923049)
LocalCDN is much, much more actively developed than Decentraleyes.

https://codeberg.org/nobody/LocalCDN/commits/branch/main vs https://git.synz.io/Synzvato/decentraleyes/-/commits/v2.0.15

I'd imagine if LocalCDN got more popular than Decentraleyes, it would probably get Mozilla's seal of approval as a "recommended" extension. Then again I'm not entirely sure what their approval process for that looks like. Currently Decentraleyes has about 100x the userbase.

Re:Firefox 85 cracks down on supercookies by nunez on Tuesday January 26, 2021 @09:03PM (#25923398)
Wow. This is really neat. I’m going to give this a shot!
Re:Firefox 85 cracks down on supercookies by zamadatix on Tuesday January 26, 2021 @12:05PM (#25918285)
I wouldn't say all speed related perks, CDNs for resources like that are still probably wider (and therefore closer) and faster than whatever is hosting your stuff for most sites. Overall it is a pretty big cut out of the performance selling point though.
Re:Firefox 85 cracks down on supercookies by TheRealPomax on Tuesday January 26, 2021 @06:22PM (#25922236)
This sounds overdramatised: caching once for a website you frequent still works just fine, with all the speed benefits on subsequent loads. You're definitely not going to be noticing that the browser now has to build a few more caches than "just the one".
Re:Firefox 85 cracks down on supercookies by madeofpalk on Tuesday January 26, 2021 @06:59PM (#25922528)
IIRC browsers (chrome and/or safari?) haven’t cached assets like that cross origin for years.
Re:Firefox 85 cracks down on supercookies by sgustard on Tuesday January 26, 2021 @08:39PM (#25923253)