I want to write an online tester, and ask for help in the implementation ideas.

Task : The site asks N questions in turn. The correctness and speed of answers are important. Moreover, the time between the questions asked should be minimal (another question is shown instantly after the previous one answers).

Question : What is the best way to download questions? and where to check them?

1) via Ajax, and also send answers (then you probably need to store the status, time of each answer in the database?),

2) download everything at once and in the script display the questions in the right order.

How best to secure the response process?

  • Well, you understand that a person can do anything with data on a client? - zb '
  • although here if the decryption key in a separate packet is sent via websockets or sse, then a very fast application can be made ... - zb '12

1 answer 1

Ajax takes questions from the database, displays it in a block, immediately take the initial value of time (), the user answered? again, we take time () and send it to the server, the answer is checked and recorded in the table correctly or not + time. Next, the next question and so on. Possible without Ajax. Time, for example, to store in a cookie, or in a session, the question number in the GET