I agree with Chris' method, but if you don't have cron, then what I do is a
page-based cache.
Since weather does not change with every page hit, you could store the
parsed page inside a database, or even write it to a flat file, so if the
page is hit 100 times an hour, and you do an hourly
I have a page with a particular PHP section that takes quite a time to load.
Is there a way I can delay that script to run after everything else has
loaded. I suppose it may need to use Javascript
Thanks - appreciate your insights.
-Doug
--
PHP General Mailing List (http://www.php.net/)
[snip]
I have a page with a particular PHP section that takes quite a time to
load.
Is there a way I can delay that script to run after everything else has
loaded. I suppose it may need to use Javascript
[/snip]
For any insight to take place we would need to see the code.
--
PHP General
Sure.
It is pretty basic stuff. I have the following ?php include
(weather/block.php); ? inserted in the middle of an HTML document to pull
in the current weather. It delays the loading of the rest of the page too
much as it queries to www.msn.com to pull weather data and then complete the
DougD wrote:
I have a page with a particular PHP section that takes quite a time to load.
Is there a way I can delay that script to run after everything else has
loaded. I suppose it may need to use Javascript
You could use register_shutdown_function() to execute the code,
providing you
DougD wrote:
Sure.
It is pretty basic stuff. I have the following ?php include
(weather/block.php); ? inserted in the middle of an HTML document to pull
in the current weather. It delays the loading of the rest of the page too
much as it queries to www.msn.com to pull weather data and then
DougD mailto:[EMAIL PROTECTED]
on Thursday, July 31, 2003 11:18 AM said:
If it were possible I want the include to occur after the rest of the
page is loaded.
Maybe instead of including the file that does the processing and waiting
forever for it to finish, you might consider setting up
...or use flush() just before that piece of code, if that's the case (if
you don't need its output to complete the page). The page will be sent,
the browser will remain in the page in progress state until the whole
script is done, but that shouldn't bother your users, since they have
the whole
8 matches
Mail list logo