-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gateway Browser UX - Loading screens? #7729
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
This has been proposed before, but suggestions to change the URL are new and interesting. We could try to add some form of Both cases would return a 408 Timeout response with body that includes a small script to display the progress (and reload when ready). I'm skeptical about relying on things like the user agent (or changing the base domain). That would break downloads, for example. A service worker could also be used to solve the issue, but we'd need some way to install it on the first request. |
@tmladek You can use data url or identity hash for including loading progress page in link itself. Data url
Identity hash Build
Test:
|
Right, hence why I thought it could reside on a different prefix (
Oh, good point. Image loading too, most likely. You'd have to be clever with where you apply this and where you don't, and you don't really want to be "clever".
I think this should be possible actually, and maybe even possible without changing IPFS - granted, the first request would still take a long time, but if that could be worked around somehow... @ivan386 Wow, that's some dark magic! Too bad you can't fit much in the link without it blowing up in size, but I'll keep this trick in mind. |
You can technically do that, but please don't. For one, it behave poorly for users who use the subdomain gateway feature:
|
Where i can test this case? I only found one public gateway that failed to redirect to subdomain because cid is long:
But it not Un-inline cid as i can see. @tmladek Example link with advanced "Loading..." page
It show simple "Loading..." page and replace it with advanced "Loading..." page when it will be loaded from IPFS. At the same time it try to redirect to test link /ipfs/QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQw (this block not exist) and fail after some time. Another example link redirects to /ipns/en.wikipedia-on-ipfs.org
I make this links on this page https://ivan386.github.io/js-loading-page-generator/ But it can be done in command line:
|
Hm. You're right. We were going to redirect to a "short" cid but I guess we decided not to implement that (probably for the reasons I mentioned). So I guess right now, we'd just fail. |
It problem of the root block. When we change some content on website it change root hash. Even if other content of website is same we need to fetch this root block from original source. I think a little about this problem. I already solve this problem on one of my websites by identity hash. Dnslink of my website contain identity hash of block that contains catalog with links to "index.html" and "content" catalog. Content catalog contain all website data. Hash of it can often change. On other hand index.html does not change. And it will be loaded almost immediately because many peers already have it block. Identity hash for that website can be build like this:
That final identity hash i write in dnslink record of website. @Stebalien Can block contain ipns links? |
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:
But I think that:
go-ipfs
already 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!
The text was updated successfully, but these errors were encountered: