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>
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!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.