Reputation: 11178
I have some large chunk of data that I want to send to the client and allow the user to edit it and send back to server, like a online editor. I want to leverage the HTML5 local storage feature. But it seems it only works on the client side with JS.
Want I want to do is:
sent from server
<localStorage id="mydata">LARGE CHUNK OF DATA</localStorage>
in my JS:
localStorage["mydata"] = "new data"
What I am doing now is:
sent from server
<div id="mydata" style="display: none;">BLAHHHHHH</div>
Upvotes: 2
Views: 1407
Reputation: 40169
localStorage by definition is for storing storage locally. So you absolutely cannot control that from the server side without any sort of communication from client <-> server.
Your server should either:
I hope this helps!
Upvotes: 4