5 ms·
I’ve thought about this a lot, but mostly in the context of reducing bandwidth use of mobile devices. Bundling with the browser wouldn’t be enough in my opinio
by __ryan__ 5y ago
I’ve thought about this a lot, but mostly in the context of reducing bandwidth use of mobile devices.
Bundling with the browser wouldn’t be enough in my opinion— the ecosystem moves too fast and you’d risk bundling outdated code.
Instead, cache common assets you’ve downloaded naturally while browsing. Use some heuristic to keep the most heavy and frequently used assets cached.
I don’t think you’d need an index. You could instead use a cryptographic hash of the asset’s content as a cache key, and the page can specify further parameters for ensuring the integrity of assets cached from external sources.
Browsers already do cache assets, but to my knowledge privacy concerns result in this cache scoped per-site.
My understanding of one of the primary privacy concerns is that you might cache a dependency which either intentionally or unintentionally acts as a tracker. If site A and site B share a dependency C, either site may be able to deduce that you visited the other by observing whether you had to retrieve C or if it was cached. I’m sure a dedicated party could craft a system which fingerprints users by giving them unique dependencies to cache. I think coming up a solution to this problem would open the door to something like this becoming a real possibility.
- davnicwil 5y agoOn using the cache for tracking, I don't think that'd be an issue with what I'm thinking about here because all the libraries in this index would be pre-populated in this special browser 'cache' (maybe cache is a misleading term here, store or repository might be a better one). Or said another way, there'd be no information to be gained from combinations of cache hits & misses because there would only ever be hits.