
- You are not logged in. | Login
November 17, 2006 2:32 am
- cplusplus
- Member


php execution control
This may be a very silly question but I have to ask it anyway.
Is there any way to halt PHP execution until *after* the HTML of the page has fully loaded?
IE. I don't want any of my PHP script to execute until the user has already seen the page, to cut down on load times.
November 17, 2006 2:38 am
- cplusplus
- Member


Re: php execution control
I've thought about my question a little more and I realize now that it's pretty well impossible to do, as PHP is parse on the server, and the HTML is parsed in the user's browser.
I still would like to hear any suggestions about how I could output a page to the user, or at least most of a page, so that they don't have to wait a long time for the PHP code to execute fully. We have some very large tables and loading all the data could take.. well.. a long time.
Any thoughts??
November 23, 2006 2:04 pm
- senjor_itc
- Member


Re: php execution control
Hi,
There is my suggestion:
You can separate the logic that get much time to execute into separate file.
Then you can use AJAX, to get this big amount of data, when parent page loaded.
Simply insert AJAX code into corresponding part of HTML.
Let me know, if you need more assistance.
Thanks


