How about using an IFRAME for each section? That will generate a new HTTP request for each part. It could get a little tricky if the queries have to be conducted sequentially, but I think it could still be made to work.
If you must generate the page with only one HTTP response, then it depends. See the related discussion on How to stream output to html page?.
Does your templating system support streaming its output, or does it only emit its output after the entire template has been processed? If the later, then there are these potential issues:
- You would have to explicitly process each sub-template and then emit its content before processing the next sub-template.
- You might have to break up the top-level template into "header" and "footer" sections and process those sections yourself.
- The resulting streamed HTML might not get incrementally rendered as you would like on all browsers. (See the comment made by akho.)
|