0

We are currently creating a plugin for internal company use which requires us to do a lot of Ajax requests for get and post, as its requirements are no refreshing of pages as possible. The plugin is use for internal analytics.

Does it affects website performance if we are planning to have 30 or more?

2
  • It's not clear from your question whether this is 30+ things that you will be doing via AJAX, or 30+ requests per load. Commented Mar 26, 2018 at 4:34
  • oh sorry... 30+ things doing via AJAX, maybe a single page will do 2-4 ajaxs request per 5 seconds Commented Mar 26, 2018 at 5:17

1 Answer 1

2

In very broad terms, each ajax request takes the same amount of "effort" by the server to process like a full page load. From this perspective, 30 AJAX requests instead of one page load sounds like a very bad idea. It all also depends on the frequency those requests are being "fired", if it happens every second it is bad, if only when a user does some action, it might not be optimal, but not the end of the world.

Of course, if this is a requirement, it can be solved by using a stronger web server, which in an intranet enviroment should not be a very expensive idea.

What you should do in any case, is to try to minimize the number of requests, for example by combining several of them.

1
  • My requests will be fired every 5 secs at least and on a single page it will be at least 2-4 depending on the page planned purpose. Sorry if my question wasn't clear. I will also take in mind your advice as it also help me decide not to go at 10 request per second :D (was planned before i read this) Commented Mar 26, 2018 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.