Skip to content

Use HTML5 Local Storage Engine to cache/queue Parse Objects and send them to Parse servers later.

Notifications You must be signed in to change notification settings

francimedia/parse-js-local-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Parse JavaScript Client + Local Storage

Use HTML5 Local Storage Engine to cache/queue Parse Objects and send them to Parse servers later.

Parse Docs: https://www.parse.com/docs/js_guide

##Example usages

  • Save requests while user doesn't have a cell connection
  • Reduce number of Parse write requests (saves $$$)

###Add Object to Queue

var TestObject = Parse.Object.extend("TestObject");
var testObject = new TestObject();
testObject.save({foo: "bar"});

Parse.LocalStorage.save("TestObject", testObject);

###Send Queue to Parse Server

Parse.LocalStorage.sendQueue();

You can send the queue either right after adding an object or on connect (or other events). ###Clear Queue

Parse.LocalStorage.clearQueue();

In the current version you have to clear the queue manually. If you do not use unique hashes or object IDs not clearing the queue will result in duplicate DB entries.

About

Use HTML5 Local Storage Engine to cache/queue Parse Objects and send them to Parse servers later.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published