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

Foreign Fetch #5

Closed
daviddias opened this issue Jun 24, 2017 · 2 comments
Closed

Foreign Fetch #5

daviddias opened this issue Jun 24, 2017 · 2 comments

Comments

@daviddias
Copy link
Member

I've been reading more about Foreign Fetch to understand if it would be the feature we need in order to enable an IPFS Service Worker to capture all the ipfs.iorequests.

Foreign Fetch is the (experimental) feature that enables domain a.com to use the service worker from b.com

Unfortunately, as explained in -- https://developers.google.com/web/updates/2016/09/foreign-fetch --, an app or website needs to set the Origin-Trial token on their HTTP response, so that the browser is comfortable with using a Service Worker from another domain.

Plus, the service worker itself would have to allow each domain, see -- https://github.com/w3c/ServiceWorker/blob/master/foreign_fetch_explainer.md --. Essentially, this is like setting up CORS for your service worker.

@lidel
Copy link
Member

lidel commented Nov 16, 2018

Sadly Origin Trial of Foreign Fetch ended and the concept was removed from spec: w3c/ServiceWorker#1188

Based on recent research done by Irakli in arewedistributedyet/arewedistributedyet#32 a partial workaround based on Iframe+ServiceWorker might exist for some use cases.

We will look into that in ipfs/service-worker-gateway#30 (cc ipfs/in-web-browsers#55)

@lidel lidel closed this as completed Nov 16, 2018
@daviddias
Copy link
Member Author

Sadly Origin Trial of Foreign Fetch ended and the concept was removed from spec: w3c/ServiceWorker#1188

Such a huge missed opportunity. Seems that we failed to make the case for it.

Based on recent research done by Irakli in arewedistributedyet/arewedistributedyet#32 a partial workaround based on Iframe+ServiceWorker might exist for some use cases.

This sounds very similar to @kumavis and @frankiebee work for Metamask.

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

2 participants