Will the remote site completely execute the server side script even though my connection times out? I am not so much asking about delivering HTML as I am executing the server side code such as PHP/ASP/CGI etc.
I guess my question is; Is there something in the HTTP protocol that checks that the requester is still “there”.
If I for instance go to a site in my browser and quickly click the stop button - is all the server side code executed or will it somehow know that I have aborted the connection and stop executing the script to save resources?
AFAIK the default_socket_timeout will only timeout a connection if it can’t be established (remote host doesn’t react).
Once the connection has been established it won’t time out, so you will always get the complete contents.
I might be wrong though …
As far as disconnecting while retrieving content goes, there is a php.ini setting that can change this (either continue processing the script when the user presses the “stop” button in his browser, or stop processing the script). Can’t remember which setting it is, but I’m sure it’s there
Why not cool? Very cool!
If a user presses the stop button in his/her browser the PHP process will be killed, freeing up resources for other requests
What’s the point of processing a request when no-one will ever see the output?
I wouldn’t use ignore_user_abort for output. But I have used it occasionally for file writing to log files and database scripts before when I wanted to make sure the script didn’t stop mid-way and muck things up.
Hm, didn’t think of it that way.
However, I’ve been programming PHP for about 9 years now, and I’ve never exprerienced the problem you’re describing, and have made my share of websites, so I’m not that concerned about that I guess.