ipfs-docs icon indicating copy to clipboard operation
ipfs-docs copied to clipboard

Explain why IPFS needs relative URLs in web content.

Open autonome opened this issue 4 years ago • 3 comments

What's the subject of the item you're requesting? I don't want to solutionize the title. Should be about relative vs absolute urls.

Example of where it's a problem for web developers trying IPFS: https://macwright.org/2019/06/08/ipfs-again.html

What's the content of the item you're requesting?

  1. the difference between absolute and relative urls
  2. how absolute urls break and/or pop you out of the dweb
  3. examples of how relative urls work across different ipfs gateways, to illustrate why it's important
  4. links to tools for relative-izing urls in static content, links to framework helpers that support ipfs by doing this nicely, etc

What will the user know how to do after going through this item?

  • what relative urls are
  • why relative urls are important
  • why full urls are bad for internal links if you want your content to be portable
  • where to find tools for your cms, framework etc

Would you be interested in helping create this item?

no, but seems bounty-able

Is there any other feedback you'd like to share about IPFS docs?

"Three keys to success: read, read, read." - Vladimir Lenin

autonome avatar Mar 02 '20 23:03 autonome

@johnnymatthews this should be a key part of the IPFS for Web Devs work.

autonome avatar May 02 '20 16:05 autonome

Good resource to pull from: https://developers.cloudflare.com/distributed-web/ipfs-gateway/updating-for-ipfs/

autonome avatar May 02 '20 16:05 autonome

Also interesting new wrinkle now that 0.5 is out: subdomain gateways. We're pushing for CIDs in subdomain everywhere for security reasons. This means "/mypath" links can work now without the hijinks needed to support relative paths.

autonome avatar May 02 '20 16:05 autonome