
Introducing Background Sync Web API - toni
https://developers.google.com/web/updates/2015/12/background-sync?hl=en
======
steven777400
This kind of capability will be very beneficial in making web apps behave more
like a first-class native application. For example, I frequently "send" an SMS
when I have no service knowing it will be processed later when the network is
restored (without manual intervention).

------
thetmkay
(Slightly tangential) does anyone else predict and hope for a looser coupling
between client and server?

Even in the age of increased connectivity, an app or static client experience,
rather than streaming (except for obvious cases like video and music), in my
mind would greatly improve the web for the user. Especially if not every user
action can be tracked with an AJAX request.

I've only started looking into building apps offline-first (late to the party)
but with tech like CouchDB, service workers etc - it's becoming much easier to
build a more decentralized online experience (and interestingly return to an
earlier epoch).

------
agluszak
But is it going to be a general standard implemented in other browsers?

~~~
coda_
All I could find was this, from the article: "It’ll be a while before all
browsers support background sync, especially as Safari and Edge don’t yet
support service workers."

It talks about using code to check to see if it's supported in the user's
browser under "Progressive Enhancement".

~~~
jaffathecake
It's got a spec
[https://wicg.github.io/BackgroundSync/spec/](https://wicg.github.io/BackgroundSync/spec/),
and Mozilla is interested
[https://groups.google.com/a/chromium.org/forum/m/#!topic/bli...](https://groups.google.com/a/chromium.org/forum/m/#!topic/blink-
dev/t9apD7cQb6I)

------
lewisl9029
This is exactly the kind of functionality that I was missing when I was
building Toc [1], a decentralized messaging app built on web technologies and
Cordova.

Since mobile devices tend to pause apps rather aggressively, getting the
Cordova app to retry message sending in the background required messing with
native plugins, and getting the browser app to do this was simply not possible
at the time.

Glad to see this feature finally become a proper web standard!

[1] [http://toc.im/](http://toc.im/)

------
nickspacek
This should be great. I work on a Cordova app where data submissions by the
user are queued in some custom iOS code and regularly attempted if there is
connectivity. When I read about Service Workers it sounded like they would be
able to do this as part of standard HTML, but I didn't see any examples of
people using them that way.

------
matthewbauer
With great power, comes great responsibility.

edit: nvm, didn't see execution time cap

------
indubitably
> Open Emojoy.

FTFY:

> Open Emojoy. In Chrome.

~~~
jaffathecake
This is covered in the paragraph before. "if you want to try this you’ll need
either Chrome Dev for Android, or Chrome Canary for desktop."

