3 ms·
If we're baking file hashes into the HTML... is there any work out there that goes the extra mile and uses IPFS as your CDN?
by nerdponx 4y ago
If we're baking file hashes into the HTML... is there any work out there that goes the extra mile and uses IPFS as your CDN?
- viraptor 4y agoDepends what you mean by that precisely. But you can load things from cloudflare's ipfs gateway without doing anything special otherwise. Directly from ipfs - not without extensions.
- nybble41 4y agoYou could include js-ipfs[0] and fetch all your resources from IPFS without going through a gateway. However, this approach would make the site fully dependent on JavaScript. A PWA with a Service Worker could perhaps implement its own client-side "gateway", translating public gateway URLs into direct IPFS access. Without the Service Worker (or without JS) it would fall back to using the gateway. [0] https://js.ipfs.io/ https://js.ipfs.io/
- nerdponx 4y agoDoes an HTTP gateway actually allow you to make peer-to-peer IPFS connections, or does the actual content end up being routed through the gateway? And if so, wouldn't that be equivalent to a traditional CDN from the perspective of a client? It sounds like we'd need to have browsers implement IPFS protocol support directly for this to be a feasible alternative to centralized CDNs.