Answer the question
In order to leave comments, you need to log in
How to return multiple json in one web request?
Hi all!
How is it possible by sending one ajax to receive data and process it immediately, without waiting for the end of the request?
i.e. I want to receive json arrays (links to photos) and immediately display them within a single request
on the server php - codeigniter is spinning.
I don’t want to shoot a lot of ajax on a request for each portion of data. (due to constant re-opening of connections to the db, reloading the framework core, etc.)
in the direction of which technology to look at, tell the composer library, etc.?
UPD. in theory, there is no problem sending several ajax from the client, but I want everything to be processed by one process on the server
Answer the question
In order to leave comments, you need to log in
1) throw out codeigniter and rewrite everything in reactphp
2) instead of inventing drug addiction, don’t worry and do like everyone else, stateless apishki and all that. keep-alive minimize the cost of establishing an http connection, and to optimize the work with the database, you can simply use persistent connections, etc.
3) throw out codeigniter and rewrite on any framework using PSR-7 or symfony/httpkernel, armed with php-pm .
How is it possible by sending one ajax to receive data and process it immediately, without waiting for the end of the request?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question