everisk Posted February 4, 2009 Share Posted February 4, 2009 Hi, I have a script where values are passed to another processing script via AJAX. The processing script may takes a few minutes to finish therefore I'd like to return a response to user before process finishes. I have done this is flash form but now with AJAX my code doesn't seem to work. My code is below. Thanks! $response = "Processing is finished"; ob_end_clean(); ob_start(); header("Connection: close"); echo $response; $size = ob_get_length(); header("Content-Length: $size"); ob_end_flush(); flush(); /// long process goes after this /// Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.