I have a page which has several independent sections. Data is to be populated in each section by different queries to the database.
In order to lower the page load time, I have ajaxified the loading of each section (following the Amazon.com philosophy).
In order to load each section of the page, I make an ajax call on $.ready() method in my page which in turn fetches data from the database.
In all 6 requests are made to the (same) server which completely generate the sections.
Now, I’m not sure if I am overburdening the server by making 6 requests each time the page is requested. Any suggestions?
(I use Struts/Hibernate/Jsp/jQuery)
You can always queue your ajax calls so they happen 1 at a time. There are jquery plugins to help with this:
http://www.protofunc.com/scripts/jquery/ajaxManager/
To me however, 6 calls does not seem too bad, as long as they dont generate a lot of server activity (hard db queries, file handling, etc…)