0

I want to store JSON objects at client side using any Java based implementation, What are the possible ways I can try.

These objects are created and stored at form submission time when Network is not available and will be sent to server when the next time Server is connected.

How can I achieve that ? Thanks in advance,

Amit
  • 13,134
  • 17
  • 77
  • 148
  • http://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java – kapa Nov 09 '11 at 09:25
  • @bazmegakapa I think u pasted the wrong link... Is any thing wrong with the language of this question... ? – Amit Nov 10 '11 at 07:31
  • I suspected you wrote Java where you meant Javascript. Hard to judge when one is drunk. – kapa Nov 10 '11 at 08:10

1 Answers1

1

Look at jstorage, they use a few strategies to store values. The basic is HTML5, which gives you up to 5MB storage and is widely supported.

However offline storage is what you need if user's actions need to survive page refresh or close. If they need to survive only temporary network breakdown, you will need only to keep them in JavaScript memory and try to repeat JSON requests until success.

I recommend starting from frequent repeats, and then increase the timeout (if network or server app is down for hours, there's no need for pinging it every second).

Danubian Sailor
  • 1
  • 38
  • 145
  • 223
  • thanks... I think that is essentially same as cookie based storage with some more Information..... I want to store large chunk of data that ll be essentially of JSON object.... – Amit Nov 09 '11 at 10:37