1
I did a survey with php and javascript, it’s all right. There’s just one small detail that I’m not sure which is the best way to do it.
The questionnaire has a time to be answered, and I would like that if the responding user leaves the page or update, the time starts to tell where he left off. I thought about making a request by writing to the comic every 2s the running time, but I would like to avoid something that would make so many requests to the database in such a short time, even more that the system is in Amazon, I want to avoid to generate additional costs.
I thought of other ways, such as Sesssions and cookies but either one is not efficient for this.
If you can help me I’m very grateful, I just need a hint as to what your experience would be a more viable option.
It is possible to confirm the exit of the page, there in this confirmation you save...
– Luciano Gonçalves
Yes, but not all browsers that onbeforeunload work very well. But thank you
– Leandro Silva Campos