Reputation: 3745
I'm using PHP as my scripting language and mySQL as my database. Im wondering if saving into database on form submit is better than saving on every keypress. Which is better in terms of usability/ux and in performance?
Upvotes: 0
Views: 185
Reputation: 2966
Saving on keypress is definitely a very bad idea ! A typical form with 10 fields, will require at least 100 calls to the database. Not very optimal. Even from a UX point of view; But you can create a setTimeout for saving the user input, say, every 30sec (the setTimeout will be initialized after the first field has been changed, for example).
Upvotes: 1
Reputation: 944020
Saving on every keypress means:
Upvotes: 2