oTree Forum >

Data integrity in case of timeout

#1 by DavidP

Hi all,

The scenario is the following: I have a page that has a single <textarea> as form input for the only form field (the <textarea> is rendered by myself in html, if it makes a difference). No submit button; instead, I use the builtin timeout functionality to essentially force users to spend exactly X minutes on this page.

I just wanted to ask whether it is safe to assume that whatever users have typed when the timer runs out ends up in the database. Or are there circumstances (e.g. temporary disconnect of the client's network) where things could go awry? (As I understand, the timeout is impelemented both client- and server-side, to ensure that disconnected clients etc still advance. In a sense, my question is what happens if the client is briefly disconnected when time runs up.) Unfortunately, this would be quite problematic for the rest of the experiment. (The experiment is hosted on heroku and run in a lab with generally very stable internet, but one never knows.)

In case there are potential problems, is there a recommended way to deal with this? Just have JS send the current text to the server in regular intervals?

Thanks in advance!

Write a reply

Set forum username