CodeIgniter Forums
displaying partial webpages - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: displaying partial webpages (/showthread.php?tid=27956)



displaying partial webpages - El Forum - 02-25-2010

[eluser]Unknown[/eluser]
i have read and googled a bit and honestly not sure how to frase the question to google to find the answer but how do you get codeigniter to display header and footer and such before i quere the database for the body information, I hate it when people are waiting for a page to load and there's nothing on screen. And some queries can be quite time consuming (this can't be avoided)

Thanks in advance


displaying partial webpages - El Forum - 02-25-2010

[eluser]n0xie[/eluser]
Use AJAX


displaying partial webpages - El Forum - 02-25-2010

[eluser]Unknown[/eluser]
My origenal responce was quite rushed, sorry. Got to do this and work

This page is primarily for search engines to reference and people who do not have flash on there systems. I assume if they don't have flash they looking for a lighter option so trying to shy away a bit from Ajax (though it is my personal preference to flash.)

as certain content need to be calculated before display and that can take time i don't want uses to be looking at a blank page. In plane PHP i can generate the base template and basic information and the page keeps loading while i do the calculations in the background.

I am nervous that is the page loads with out the information google and such may not correctly index and wait the flash information.

Is it possible to do this in codeigniter?

thanks again


<original response>
as the page is primarily for index by search engines, is that a safe approach? also none flash browsers so want to keep ajax away from basic page generation, though it will generate ajax for some elements.


displaying partial webpages - El Forum - 03-01-2010

[eluser]n0xie[/eluser]
The PHP parser waits for the entire script to finish before sending output to the browser. The only other solution besides AJAX is using frames, which I would highly discourage.