If a page is called that requires a lot of processing and the user clicks stop before the end, does the browser simply stop the request at the client side?
Or is a 'stop' message sent to the server, i.e. is the processing cancelled?
If a page is called that requires a lot of processing and the user clicks stop before the end, does the browser simply stop the request at the client side?
Or is a 'stop' message sent to the server, i.e. is the processing cancelled?
No message is sent to the server when that happens. When the user presses the stop button, the browser just halts the rendering of the page and ignore any further response= from the server.
If the request has already been sent to the server, the server will usually continue executing it. However, depending on the server's implementation, may detect the dropped connection. Meaning you can not rely on the fact that it will continue in every case.
There's no "STOP" messages/requests defined in HTTP, since HTTP is stateless, and stopping a request would require you to know its ID. Quite naturally, as soon as HTTP request hits a server, it cannot be stopped from the outside world.
Actually it kind of sends a "stop message" by closing the connection. This is true only if it is still waiting for output from the main request (not when finished downloading content and started loading images and stuff). So you can detect if the user presses the stop button OR there is some trouble with the connection, when you get connection closed message.
Here is some info on PHP's user manual: http://php.net/manual/en/features.connection-handling.php
On a side note - it always depend on the browser implementation and there is no certain way to be sure if the user pressed the stop button or the connection just dropped.