Re: Looking for ways to prevent timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/5/07, Jon Westcot <jon@xxxxxxxxxxx> wrote:
>
> Hi Nathan:
>
>     No, I'm not familiar with Ajax.  Where can I read up on it?  More
> important, how can I find out if Ajax is implemented on the server?  Or is
> it something I can add myself?
>


if you arent familiar w/ ajax, no worries; the main concept in my suggestion
is
sending a number of requests rather than a single request.  that way you can
execute a fraction of the queries on each request.  this will ensure that
you  dont
hit the maximum execution time.

a purely php approach would be using the header() function.  so, on each
request
where the queries are not yet complete, your script sends a header tag to
the browser
which will immediately invoke another request back on the same script.
once all the queries have been executed dont invoke the header() function,
that would
essentially be the results page.
the reason i prefer ajax over this approach is that the page will be
blanking out a lot,
basically on every request.  but it would defiantly work.

also, ajax is mainly a client side technology; where http requests are sent
to the
server without incurring a ful page refresh.  you need nothing extra on the
server.
ive been using prototype, a javascript toolkit which has some nice support
for ajax.
if you want to  check it out, heres an article on ajax using prototype:
http://www.prototypejs.org/learn/introduction-to-ajax

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux