2
The thing is, I’d like a suggestion and tip to make a correct system. For example, today I use jquery and many requests $.ajax, this is to popular some data, to send form data and etc. But I realized that I’m making many requests to the server and I don’t know if I’m using right.
To give an example I have a customer registration form for example, when the registration page is opened I call several requests being them:
- Load the states -- Load cities (when changes status loads cities)
- Loading the trades
- Carry the marital status
- Carrega Place of the dwelling
Among other data I dynamically populate
My question is this, which is the best way to make these requests? or what to do maybe to optimize and not fill my code with $.ajax...
I recently saw a post from wBruno on his personal blog saying that it is not to use jQuery exaggeratedly, and I’m doing exactly this hahah..
How do you work with this? When you need to popular several values in a Dropdown? I appreciate the tips!
I use the Axios in my projects, it is much lighter than the function Ajax jquery. I answered a question similar to yours regarding Jquery performance, I hope it helps you. Follow the Link: Question: Slow data retrieval with ajax and php
– Gabriel Victor