Save form data in browser backward or forward

The problem I am facing is that some browsers lose data when the user hits backward or forward. For example, Firefox, in most cases, loads from the cache, so everything is fine, but Chrome restores the form every time!

Now I store the data in a cookie and load it. But this is not only one form and the forms are large, and sometimes, the size of the cookie is not enough. Could not find another way to do this ...

Can you offer me something and help me solve this? Thanks in advance.

+3
source share
3 answers

. cookie cookie , . , .

0

AJAX (, ), AJAX, .

0

what can be done as follows. On your HTML page, make sure you set HttpSessionvariable true. This can be done as follows:

<% HttpSession ses = request.getSession(true); 
 //      ses.sesAttribute or ses.getAttribute can be used
 %>
0
source

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


All Articles