- From: Jake Archibald <notifications@github.com>
- Date: Tue, 19 May 2015 06:30:17 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Tuesday, 19 May 2015 13:30:44 UTC
In browsers that support background sync, you probably want them to handle the `POST` for the first attempt. With your current steps, data will be lost if the user closes the tab between steps 1-4. I think it should be: 1. Page: User clicks "send" 1. Page: "sending" UI (spinner or notification) 1. Page: Save data to IDB "outbox" 1. Page: Register for background sync 1. SW: On sync, empty outbox, communicate success/failure to clients 1. Page: Show success/failure UI (failure can reassure the user the send will be attempted later) However, I agree that Request/Response should be able to go into IDB, as long as `bodyUsed` is false. Getting a request/response from IDB should always return an un-drained copy, as the cache API does. --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/693#issuecomment-103490806
Received on Tuesday, 19 May 2015 13:30:44 UTC