When POST through AJAX / jQuery, one big request or many small ones?

Well, I’m going to create a rather complicated form for publishing through AJAX many different types of information on a PHP page, which will then analyze the data and CURL different types of data into the correct tables in another database.

Usually I just send a HUGE POST request and then parse the information on the PHP page, making a few CURL requests in the way of publishing the various elements.

The disadvantage is that the form is not super responsive, it usually takes 5-10 seconds for the PHP page to give a-ok. I would like this new form to be faster for better data entry, allowing the user to go to the next record without a hitch.

So, just find some professional advice: make 5 AJAX requests on 5 pages of PHP or stick to a heavy load?

In terms of scale, as a rule, there will not be many users at the same time (this is internal for the organization), I am trying to optimize for one person who again and again introduces many records with the same form.

All tips are welcome and welcome.

+3
source share
3 answers

A PHP page that will then analyze the data and curl the various data types into the correct tables in another database.

HTTP? , AJAX, HTTP- 5 , !

+1

-, , , , jquery , , .

, , , 100x100, , , .

, , , , , , , , , , , .

, , , , , , , .

+1

: , , "5 " /, 5 POST. PHP , , .

session_write_close() , POST / 5 .

0

Source: https://habr.com/ru/post/1763904/


All Articles