-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Loading an IPFS object often takes a non-trivial amount of time, and in my experience, resolving an IPNS name can even take up to half a minute.
Even a couple seconds of loading time is enough to make people unfamiliar with IPFS think that the link (URL) is broken, especially because they get no indication that the request will actually resolve - they only see a blank page in their browser.
I've repeatedly ran into this problem when I used IPFS to host a landing page of a project I was presenting at a virtual event recently. I've received dozens of e-mails complaining that "the link doesn't work", or simply that it "doesn't load" - but when I inquired further, every single time it turned out that everything was working fine on their end, the gateway just took a bit longer to load up than they're used to from regular webpages, so they abandoned it altogether. We eventually had to put up a notice about that next to the link (which most people didn't notice, so the e-mails kept coming...)
I think that if there was a generic loading page that would just display some sort of a "loading" indication (possibly with a link to learn about IPFS?) and then redirect the user to the content once it's fetched would fix this issue completely, and possibly help adoption of IPFS in general.
Now of course doing this the simplest way would break most apps that rely on the URLs actually resolving to the content represented by that hash (instead of a html/javascript document) but I think there's ways to resolve this - namely, the behavior could be dependent on the User-Agent, or it could reside on a different URL pattern (i.e. not /ipfs/{hash} but /ipfs_loading/{hash} or somesuch).
Finally, you might be right to suggest that:
- This is actually solving the symptom instead of the problem (IPFS performance).
- This will not apply to the majority of IPFS loads, and is superfluous.
- It could be worked around by using a custom/private gateway.
- The functionality has no place in the core IPFS implementation.
But I think that:
- Even if IPFS performance improves significantly, there will still be the odd and rarely-visited CIDs that will take a while to load up (at first).
- I think this could be engaged only if the gateway detects that the request takes longer than some amount of time (5 seconds?).
- Even private gateways could benefit from this (because of the above, unless the gateway has literally all requested CIDs already available)
go-ipfsalready provides a fancy (and pretty!) Web UI, so one more view wouldn't add too much weight :)
What do you think? Thanks for your consideration!