jcoglan / restore

Simple remoteStorage server written in Node.js
293 stars 27 forks source link

Requesting all data on every sync #12

Closed xMartin closed 10 years ago

xMartin commented 10 years ago

When using reStore the browser requests all existing data for the app on every sync even if nothing changed since the last sync.

I'm using remoteStorage.js 0.8.2

Is this related to #6 or https://github.com/remotestorage/remotestorage.js/issues/417

jcoglan commented 10 years ago

I'm not sure if it's related to #6, but I have now merged #6 and written an example against the 0.8 client. See https://github.com/jcoglan/restore/blob/master/example/rs-0.8.html. When I load this after getting an auth token, the Chrome console says, Refused to get unsafe header "ETag", even though ETag is listed in the Access-Control-Expose-Headers response to OPTIONS. On page load, that example makes an OPTIONS call for each document, followed by a PUT.

Can you try running the examples in this repo and let me know what you find out?

xMartin commented 10 years ago

@jcoglan I get the same error on Chrome but the example works. In Firefox there's no such error.

xMartin commented 10 years ago

I tried latest reStore (master) with remotestorage.js 0.9.0 and I don't have the problem of requesting all data on every sync any more.