Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #7464
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Output status during processing |
| Date | 2012-11-05 12:40 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <k78c35$rlk$1@dont-email.me> (permalink) |
| References | <k76fcg$8at$1@dont-email.me> <afo4vnFfjeU1@mid.uni-berlin.de> <k76o3p$dn$1@dont-email.me> |
On Sun, 04 Nov 2012 13:52:35 -0800, Scott Johnson wrote: > I could use AJAX to load the file and then process it in the background > sending status points as it goes through AJAX. Back up a step. The server can't "send" status updates to the browser using ajax in the normal case, rather the browser would request "request" status updates from the server, usually in relation to some browser event (which might be a javascript timer timeout, or the user clicking a "get update" button or link). Ajax, which is built on the http request / response, which is in turn built on a tcp/ip connection, is not a technology which generally allows the server to push unsolicited data to the browser, rather it is a technology that allows the browser to make requests to the server and receive data back without reloading the page being displayed. Specifically, when you make an http request to a server, a tcp connection is opened to the server. The connection is usually closed after the server has sent the response. Making a connection to the server is easy, because tcp/ip knows that the server is listening to http on port 80. In the other direction, there is no official port that a browser listens out on for a server to make a connection to it, which makes it difficult for the server to open a connection to the browser to just send it something. I know it may sound like a petty distinction to make, but making the distinction helps you keep it clear in your mind how it all fits together, and in the concept of php running behind a web-server, the context is generally servicing and responding to requests from the browser, not pushing data to the browser. Rgds Denis McMahon
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-04 11:23 -0800
Re: Output status during processing "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-11-04 22:28 +0100
Re: Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-04 13:52 -0800
Re: Output status during processing Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-04 20:21 -0500
Re: Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-04 19:10 -0800
Re: Output status during processing crankypuss <noemail@noemail.invalid> - 2012-11-05 07:24 -0700
Re: Output status during processing Denis McMahon <denismfmcmahon@gmail.com> - 2012-11-05 12:40 +0000
Re: Output status during processing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-05 17:32 +0100
Re: Output status during processing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-05 14:22 +0100
Re: Output status during processing Scott Johnson <noonehome@chalupasworld.com> - 2012-11-05 11:59 -0800
Re: Output status during processing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-06 00:21 +0100
csiph-web