Reputation: 193
What would happen if I have a lot of ajax request, let say 10 jquery ajax request on the
$(window).load(function ())
when the website opens??
I am planing to do a lot of ajax request I am just wondering what would happen and would it make my website lagging?
Upvotes: 1
Views: 140
Reputation: 28737
No, it wouldn't make the rendering (!) of your page laggy since the requests are executed asynchronously.
However, if the your page depends on the data from the services before displaying anything, then it will probably feel laggy.
Keep in mind that if you do a lot of requests, the browser will start queueing them.
Upvotes: 2