save large chunk of JSON without cookies
I am writing an HTML/JavaScript program that gives me a JSON object as a string.
I want to save that string as a cookie, but the string is too large to 开发者_如何转开发be saved as a cookie.
How can this JSON string be saved without cookies?
Depending on browser coverage, you can use HTML LocalStorage object. Or flash cookies as an alternative.
Does it need to stick around when you leave the page? If not, just store it in a javascript variable.
Save it in the session or cache it?
We need to know more information. What framework are you using? Is the only technology you want to use HTML/Javascript?
The two sort of mainstream ways to do this are to store it in local or server side databases:
So server side you can look at SQL Server, MySQL, PostgreSQL, Oracle, etc. Client side you can look at Local Storage: http://diveintohtml5.ep.io/storage.html
精彩评论