What would be the best way to handle this? Say you have a session timeout of 20 minutes. The time before your session is timed out, is supposedly reset on every page refresh. I have a webpage that has, say 200 input fields and text areas, which sometimes takes longer than 20 minutes to fill out for the user. The user can hit a save button which saves the data, refreshes the page (hence resetting the time to timeout) and shows the page with the already entered data. I'm thinking how I can help the user not lose their data. The site uses PHP
- There could be a timer that starts counting down from 15 minutes after first input keystroke is registered using jquery or javascript, and when 15 minutes is passed the user is notified that they should remember to save the content.
- There is an AJAX call happening on keyinput and every 10 minutes to another page on the same website with session_start to keep the session alive.
- Data is saved automatically every X minutes via AJAX in the background, however this method is not preferred by the staff here.
Have you dealt with this before, and how would you say is the best way to do it?