I have a JSP page that starts with some static contents, then there are lot of dynamic content. when ever the link to this JSP is clicked the static content is displayed first and after some time (with some time lag) the rest of the section (having dynamic content) is displayed. I understand that dynamic content is loaded late because there are lot of server side processing. But I need a solution to load the whole page at the same time. I do not want the user to first see the static content with the other section as white page and then after some time the rest of the page loaded. Is there a way to get the whole page loaded at the same time? I am using IE 8 and above. Thanks in advance for your help.
Rohit Kejriwal wrote:I understand that dynamic content is loaded late because there are lot of server side processing.
Nope. The dynamic content is processed on the server, and the resulting HTML is sent as the response. The static content doesn't get sent first and other stuff later on as it is processed. So the whole concept of "late loading" is a red herring and does not exist.
Thanks Bear Bibeault for the response. I have a jsp were within the HTML body tag I include another jsp header.jsp with static contents. Then there are html table were other jsp's are included one after another. All this jsp's uses lot of customised tag library. Page is quite big with lots of content. But i am not fetching any record from data base. Header.jsp shows up on the sceen and after some delay rest of the section is displayed. I want to get rid of this delay.
Can't help with the scant information that you've supplied. It could be that the large content is just buffering, of could be that complicated content is causing the browser to display things in an odd fashion. Have you observed this behavior in multiple browsers?
How long is the delay we are talking about here? a few seconds? 10 seconds? 30 seconds? minutes!?!?
How large is the content of the "static" area on the page?
If your static section is > 8k, you might try
<%@ page buffer="16kb" />
This just increases the amount of memory used to store the resulting jsp page before it has to start writing it out to the browser.
That wouldn't make the page any faster to display, just might mean that the header gets displayed at the same time.
subject: Different section of JSP page loads with time lag