NYCPHP Meetup

NYPHP.org

[nycphp-talk] Please wait, processing, message technique

Tim Lieberman tim_lists at o2group.com
Tue Jul 10 13:45:51 EDT 2007


Never really thought about it.

If your backend processes is asynchronous (or if you make it so) you 
could have your "progress" script just meta refresh until the back-end 
has a result, and then on the next refresh, 302 out of there.

Cliff Hirsch wrote:
> For long and indeterminate page processing, like connecting with a 
> credit card payment gateway or calculating pi to thousands of 
> significant digits, what is your preferred method for displaying 
> “please wait”?
>
> I see two techniques:
>
>    1. Use Javascript upon form submission to display the “please wait”
>       message
>    2. Echo a “please wait” page from the server and then do a 302
>       redirect upon completion of the scrpt.
>
>
> Issues:
>
>    1. Not everyone uses JavaScript
>    2. Can you issue a header redirect after echoing a “please wait”
>       message. I though headers need to be sent first. Is a 302 header
>       redirect an exception?
>
>
> Cliff
> ------------------------------------------------------------------------
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php




More information about the talk mailing list