Re:The Dark Side of Firebase Syncing: Test Procedure and Res...
by sethinsd on Thursday September 05, 2013 @06:20PM
(#6337488)
There is no other framework out there that can fix this problem. You're disconnected, you can't magically have your data given to the server.
Granted, I would like to do this:
Firebase.setInSyncCallback(function(isInSync) {
if(!isInSync) somediv.innerHTML = "Your changes have not been saved to the server yet.";
else somediv.innerHTML="";
});
[ Parent
| on HN ]
Re:The Dark Side of Firebase Syncing: Test Procedure and Res...
by nigekelly on Friday September 06, 2013 @05:57AM
(#6339533)
Yes I appreciate that I'm disconnected. My issue is that .on() continues to work as if I'm connected for the client who is originating changes locally but that all other clients are blind. I think the app developer should be able to choose that .on() only triggers once firebase really calls back.
In addition, it should be possible to create a safety net using localStorage so that unsynced data can be saved and put back into play after a page refresh. So I think this problem is very fixable.