Skip to content
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

Static websites structures are incompatible with current IPFS-HTTP gateways #95

Closed
castarco opened this issue Sep 16, 2015 · 4 comments
Closed

Comments

@castarco
Copy link

Hello,

because the URL structures used in the IPFS-HTTP gateways, many static websites can become "broken" when using relative paths in their links.

Even if we can manually fix the links in the browser address bar, manually fixing the CSS and JS links is very annoying.

I imagine possible "fixes":

  • Making native the IPFS protocol in the most popular browsers.
  • Adding code to the gateways to modify on-the-fly the served HTML files (this "feature" should have the option of being enabled and disabled).
  • And other variations of the previous ideas.
@jbenet
Copy link
Member

jbenet commented Sep 16, 2015

indeed

  • Making native the IPFS protocol in the most popular browsers.

this is the right fix.

though i suspect many things hardcode domains and protocol identifiers too. it will be a mess, and frankly, website creators ought to be more conscious of what objects they pull, and from where. thankfully, this will be made really easy with IPFS (we'll have a "resolve links" tool that can walk files and convert /ipns/<name> links to their /ipfs/<path> targets, for use in build steps), but of course this doesn't solve the past.

if other people have more ideas, we're all ears :)

@castarco
Copy link
Author

Maybe we can do a simple command line tool to "fix" the HTML files before publishing them through IPFS. It would be a workaround, but even being a workaround, it will be very useful to help people start using IPFS.

@jbenet
Copy link
Member

jbenet commented Sep 16, 2015

Absolutely. please go for it! 👍 x 💯

@daviddias
Copy link
Member

Hi @castarco! A lot on the DWeb has happened since this issue was created :) People are hosting a ton of Websites on IPFS and nowdays tools just as create-react-app, gatsby and hugo already handle properly relative URL linking so that websites don't get messed up.

Closing this issue for the sake of having our issue tracker groomed. However, if this is still of your interest we now we have a forum perfect for these type of discussions, you can check it out here https://discuss.ipfs.io. Happy DWeb Hacking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants