Node js : I am taking a survey which have 21 question init and answer should be in written text so the Json became very big. My question is how should I send my data to the backend should I send the whole JSON or I should store it in the file and then send it what is the best practice for this ? (Front End : JQuery And Backend : NodeJS )
Define "very big". Cause I seriously doubt that your users will write answers that weight more then say 50Kb. Note that average kindle ebook weights ~2.5Mb with ~300 pages ( https://www.quora.com/What-is-the-average-file-size-of-an-e-book ). And even this size is not really big for a request.
Anyway, to improve UX it is worth considering splitting the survey into multiple pages and sending each page to the server one-by-one. For that you have to store those pages on the server side of course (possibly with timeouts in case a user decides he won't continue).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.