Storing persistent data in the browser

For my web application, I need to store form inputs spanning several pages until I finally process them and create some results (mainly by formatting the input and presenting it in some layout). The options that I have are

  • Continue to send user inputs to the server, store them there in a database, do only the final manipulations and show the result.

  • Store the entries in browser memory when the user fills out forms and finally uses this data to manage and display the results.

I really want to use the second method, and perhaps the possible way is to use cookies, but I'm afraid that I can just push the upper limit on the storage of cookies. I am also open to understanding the merits of the first method or any third method.

thanks.

+3
source share
5 answers

Clicking on the cookie storage limit may indicate that you are trying to store too much on the client side. It might be wise to store it on a server, something like a session. Then the session key can be saved in a cookie.

, cookie, / ( ). , cookie, . / , ( , , , , , cookie).

+3

webstorage ( 5 )

- Firefox: http://codebase.es/test/webstorage.html

DOM Storage -:

  • Internet Explorer 8
  • Firefox 2 sessionStorage, 3.5 localStorage
  • Safari 4

Google sessionStorage localStorage.

webkit sql.

Edit:
, , AJAX javascript, - .

+4

Flash- Flash Shared Memory Api Google Gears.
, , , cookie, , .

+1

cookie 4k, .

, cookie - .

, . Spring Webflow , : http://www.springsource.org/webflow

Java, .

: / cookie , , , , cookie, .

0

I would suggest storing data in a session variable until you go to the last step, and not into a cookie. I think this would be safer for your data, as the user does not have direct access to the data, so you can check how you are going.

0
source

Source: https://habr.com/ru/post/1720956/


All Articles