-
Notifications
You must be signed in to change notification settings - Fork 66
Offline support #11
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
Comments
Maybe for such scenario it's better to share image as Blob #7? With such approach there is no need to change anything on the OS side, but only in the browser. Browser can execute request to get mime-type and if it's applicable then share binary content. |
@terales using blob URL's sounds like a solid web platform capability to me, but by not sharing URLs you have no ability to meaningfully talk to 3rd parties about whatever it is you the target have been sent. That makes sharing blob URL dangerously anti-web in my view. I've commented more directly in #7. It's a good idea and would offer a direct path to better offline support, but I'd much rather see something that integrates well with the web and it's growing offline capabilities. |
So to clarify what you're requesting: when a native app receives a shared URL, it then fetches the URL and that fetch gets proxied through the user agent's service worker (allowing for URLs to be fetched while offline)? That sounds cool, but I think "pretty complicated" is an understatement. This isn't really a feature request of Web Share, but a feature request for operating systems. All of them would need to change their URL fetch mechanism to proxy through the browser, or provide a new API for doing so. I think that's quite outside the realm of possibility, and certainly outside of the scope of Web Share. I agree with terales@; I think sending blob data instead of URLs is the offline story for Web Share. And I will respond to your objections on #7. |
Whoa whoa, what??? No no no no. That sounds truly mad. First off, there are established HTTP proxy protocols. The browser need only implement one of those. Historically the HTTP_PROXY environment variable is all that's required to point most applications to a proxy! That could be set in the environment variables for any system wanting to use a proxy the browser provides. A browser could try to install this into the system envs if desired. What the browser would have to provide is a proxy implementation that A) looks for the resource in foreign fetch Service Workers & tries to reply with those and B) passes all remaining requests through to the OS. This is non-trivial, but also doable. This could perhaps even be implementable as a website + local proxy daemon on the device, without needing browser support at all. It'd be complex and scary devising some transport to funnel requests- a ServiceWorker using long running Fetch requests against a local proxy daemon, which funnels requests to the ServiceWorker who then runs a new Fetch for that requests & funnels it back down & out. Hopefully such antics need not be considered and this issue can be reopened here or in some other venue in the future. Maybe needs it's own WICG perhaps, and for this spec to perhaps maybe mention this. |
Sure, there are mechanisms for setting an application as a proxy in an operating system. Above all other concerns, this is absolutely outside of the scope of Web Share. You are essentially proposing a new web platform feature (or perhaps browser feature?), which is that a web browser should:
Off the top of my head (without giving much serious consideration), here are some concerns with this proposal:
This sounds like an incredibly complex solution in search of a problem (considering we can have offline support for Web Share by simply passing a blob object as I was originally intending). |
Hiya! This is a pretty complicated ask, but I'd like to see offline support added to enrich this great capability.
From within a user-agent, if an origin has a foreign-fetch worker installed, other origins can- even while offline- issue requests and the foreign fetch handler has an opportunity to serve that request.
It would be very interesting and powerful if the user-agent could externalize this servicing: when a "Gallery" application goes to open a photo url, if the OS could proxy that request through the user-agent such the user agent could try to use it's foreign-fetch handler, then it could be possible for Gallery to open a photo even though the device is disconnected.
Also, without some kind of integration with foreign fetch, the Gallery app will always have to redownload the image, even though the user agent may have it cached, & that could be a considerably large download.
The text was updated successfully, but these errors were encountered: