in-web-browsers icon indicating copy to clipboard operation
in-web-browsers copied to clipboard

Identify Browser Features we Rely on or Want to See

Open flyingzumwalt opened this issue 8 years ago • 17 comments

Delivarables:

  • [ ] list of browser features we already rely on
  • [ ] list of browser features we would like to see

flyingzumwalt avatar Feb 13 '17 19:02 flyingzumwalt

@lgierth do you have any ideas of initial things to put in these lists? @diasdavid? @jbenet? @dignifiedquire?

flyingzumwalt avatar Feb 14 '17 17:02 flyingzumwalt

What we use

  • websockets
  • webrtc data channels
  • webcrypto
  • webworkers (trying, not fully there yet)
  • asm.js
  • xhr
  • fetch

What we want

  • webrtc data channels in webworkers
  • better suborigin spec
  • some enhancements for webcrypto
  • streaming support for fetch
  • cancel support for fetch

dignifiedquire avatar Feb 14 '17 17:02 dignifiedquire

stuff we use:

  • websockets
  • webrtc data channels
  • @ipfs/javascript-team what else? localstorage? webcrypto?
  • suborigins

stuff we'd like to see

  • support for first-class origin-less content (we're figuring this out this sprint)
  • dns resolution api, instead of deferring to the browser
  • unreliable webrtc data channels (chrome might already implement it)
  • more webcrypto
  • custom protocol handlers (ok in firefox, only with web+ prefix in chrome)
  • consistent ipv6 usage (inconsistent RFC6555 impls, no ipv6 at all in chrome if no ipv6 connectivity to google.com)
  • ...

ghost avatar Feb 14 '17 17:02 ghost

Updated my comment to be a bit more specific

dignifiedquire avatar Feb 14 '17 17:02 dignifiedquire

I've seen some automated tools out there that parse code for web api usage, can't remember any sepcifics

kumavis avatar Feb 14 '17 20:02 kumavis

streaming support for fetch

I believe this is a thing. just some weird browser standard promisy pull-stream like thing. poor adoption currently.

https://developer.mozilla.org/en-US/docs/ReadableStream https://developer.mozilla.org/en-US/docs/ReadableStream#Browser_compatibility

fetch('/big-data.csv')
.then(function(response) {
  var reader = response.body.getReader();
  search()
  function search() {
    return reader.read().then(function(result) {    
      if (result.done) {
        // ...
      }
      return search()
    })
  }
})

kumavis avatar Feb 14 '17 20:02 kumavis

@kumavis it's a thing, but only usable in Chrome, so it's like it doesn't exist effectively

dignifiedquire avatar Feb 14 '17 20:02 dignifiedquire

@dignifiedquire @lgierth awesome list!

One more thing we use:

  • IndexedDB

What we also want:

  • drag and drop of directories

daviddias avatar Feb 15 '17 08:02 daviddias

An IndexedDB connection can only access databases associated with the origin of the global scope from which the connection is opened. If the browser thinks the URI of an IPFS page being viewed is a different origin than another page, then they can't share an IndexedDB database, such as cached IPFS blocks. I'm curious, have you found a way around the origin restrictions?

jefft0 avatar Feb 15 '17 08:02 jefft0

Adding to the list of features we use (front end side):

  • MediaSource - Currently the only way to stream audio & video from js-ipfs and the implementations in browsers leave much to desire (although I haven't had much problem in Firefox, usually in Chrome). Essentially what we want here is to stream chunks of data (directly from js-ipfs) to video/audio dom elements, with buffering and seeking (offset) possibilities.

Want to use in the future:

  • MediaRecorder

haadcode avatar Feb 15 '17 10:02 haadcode

@jefft0 could make a special gateway that works like this ${cid}.ipfs.io/index.html edit: except the cid would need to be in a case-insensitive encoding

kumavis avatar Feb 15 '17 20:02 kumavis

@kumavis I believe the same-origin policy requires the entire host to be the same. So the different ${cid} would make it a different host and origin.

jefft0 avatar Feb 15 '17 20:02 jefft0

@jefft0 Oh ok I misunderstood which you wanted (isolation vs unification). I have a project that exposes the ethereum blockchain app api to a webapp and unifies the cache inside an iframe. Seems like something similar would be useful here.

[small ipfs-iframe lib] <-> [ipfs node in iframe] <-> [network]

We're also exploring making the node a singleton by using ServiceWorker.

[small ipfs-iframe lib] <-> [ipfs iframe proxy] <-> [ipfs node in serviceworker] <-> [network]

I'm sure theres a few gotchas with this approach, especially that webrtc may not be available in the SW.

kumavis avatar Feb 15 '17 20:02 kumavis

@haadcode @VictorBjelkholm @Kubuxu did anything come up in the windows.ipfs work which would be worth adding here?

ghost avatar Feb 22 '17 02:02 ghost

@lgierth I'm currently having issues that sure, could be easier but after talking with web extension people at Mozilla, things should be able to work. Mainly I'm having troubles passing down objects created in background-context to the web page, but we should be able to work around that.

victorb avatar Feb 23 '17 12:02 victorb

Support for DNS lookups or at least TXT lookups was rejected on the mozilla tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1343849#c3

ghost avatar Mar 28 '17 02:03 ghost

Pushing support for DNS TXT once again, this time on the shoulders of newly added WebExtensions API:

  • https://bugzilla.mozilla.org/show_bug.cgi?id=1449171

lidel avatar Mar 27 '18 14:03 lidel