dat-ecosystem-archive / dat.json

The WIP specification for the dat.json meta format [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
MIT License
27 stars 4 forks source link

Proposal: Link relationship "https" #16

Open da2x opened 6 years ago

da2x commented 6 years ago

Link to a web variant of the current resource. Should be a base URL equivalent to web_root (or root directory if missing). Can be used by clients to construct web-variants of URLs for sharing with non-peer-to-peer clients.

{
  "links": {
    "https": [{"href": "http://example.com/kittens/"}]
  },
  "url": "dat://example"
  "web_root": "/public"
}

Use-cases:

pfrazee commented 6 years ago

Why do you think this is worth adding? Did you have a specific moment you felt like it would've helped out?

da2x commented 6 years ago

DEP 0005 establishes how you can map a HTTPS origin/domain to a Dat origin/hash. This allows you to upgrade a HTTPS connection to a distributed Dat connection. But how do you map things the other way around?

go_to_https_button

Beaker Browser has a UI switch that lets you switch to a HTTPS variant for the current page. However, this only shows up when the current peer-to-peer origin was discovered via DEP 0005. Having a standard method to link a Dat origin to a HTTPS origin would mean that this button could be displayed more consistently.

It’s also useful being able to map a Dat-to-HTTPS for sharing links with people who’re not yet able to access content on the distributed web. E.g. people behind corporate firewalls, or when sharing to a traditional social media website.

pfrazee commented 6 years ago

@da2x Right it makes sense, but I can't think of a specific feature that I'd implement around this. The "Go to HTTP/S version" badge appears when we auto-redirect you from HTTPS to Dat. I wouldn't necessarily want it to show up in non-redirect cases. So, I don't think Beaker would leverage this right now.

Users would also need to manually enter the link, which I don't really see happening that often unless there's clearly some software that's using it.

Unless there's some existing software using this, I don't really see the point of standardizing it.