You are here: Re: "header" call doesn't work before lenghty operation « PHP Programming Language « IT news, forums, messages
Re: "header" call doesn't work before lenghty operation

Posted by Jasen Betts on 02/19/06 05:42

On 2006-02-18, a <xxxxxxx@pacbell.net> wrote:
> Thanks all for your replies.
>
> I'm glad I sparked a (somewhat heated) debate on the subject, but I still
> don't see a solution with predictable results to the issue of asynchronous
> processing on the server while displaying feedback to the user, at least not
> if the requirement is for it to be implemented entirely on the server using
> php. But this is most likely due to my lack of knowledge - there must be a
> bunch of apps that do lengthy operations on the server and which provide
> user feedback, a cancel option etc.
>
> Another solution would be to use some javascript on the client. My concern
> is that not all browsers implement java script, and even if present, some
> users may disable it.
>
> So does it make sense to implement a solution based on js and require users
> to use a js capable browser and to have it enabled? Are there any stats as
> to what % of users would be lost this way?
>
> Thanks
>
> A

If you know how long the process will take send a redirect header with the
apropriate timeout, then send content. flushing as neccessary.

1% complete
2% complete
3% complete etc...

True asynchronous feedback requires separating the "background process" from
the web server process and providing a way for them to communicate (eg
writing status info to a file)

Bye.
Jasen

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация