{"id":8102,"date":"2015-11-26T13:39:53","date_gmt":"2015-11-26T13:39:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/26\/pouchdb-keep-polling-while-offline-open-source-projects-pouchdb-pouchdb\/"},"modified":"2022-08-30T15:03:01","modified_gmt":"2022-08-30T15:03:01","slug":"pouchdb-keep-polling-while-offline-open-source-projects-pouchdb-pouchdb","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/26\/pouchdb-keep-polling-while-offline-open-source-projects-pouchdb-pouchdb\/","title":{"rendered":"PouchDB keep polling while offline-open source projects pouchdb\/pouchdb"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d83613912d1a2511a784b99c703bdcf6?s=128&amp;d=identicon&amp;r=PG\" \/> <strong>NickColley<\/strong><\/p>\n<p>PouchDB&#8217;s goal is to mirror CouchDB with feature parity, one feature of CouchDB&#8217;s replication is that it will timeout after a while if it&#8217;s offline so this&#8217;ll require you to start replicating again as you&#8217;ve noted.<\/p>\n<p>There is an open issue (https:\/\/github.com\/pouchdb\/pouchdb\/issues\/966) about infinite replication, so this would not be an issue but until then you can use the same replication call you used to start the replication in the first place:<\/p>\n<pre><code>db.replicate.to(remoteDB, [options]);\n<\/code><\/pre>\n<p>http:\/\/pouchdb.com\/api.html#replication<\/p>\n<p>One option would be to try something like http:\/\/github.hubspot.com\/offline\/docs\/welcome\/ but hopefully we can get this feature added to PouchDB.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NickColley PouchDB&#8217;s goal is to mirror CouchDB with feature parity, one feature of CouchDB&#8217;s replication is that it will timeout after a while if it&#8217;s offline so this&#8217;ll require you to start replicating again as you&#8217;ve noted. There is an open issue (https:\/\/github.com\/pouchdb\/pouchdb\/issues\/966) about infinite replication, so this would not be an issue but until [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8102","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8102"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8102\/revisions"}],"predecessor-version":[{"id":8621,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8102\/revisions\/8621"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}