Not in any reliable way. Once the http server has received the full request, it is working asyncronously from the client (i.e. the browser). Once your script has received the full request, it is working more or less independently from the http server. And in any way, fully independently and asyncronously from the client browser.
Think of what your script is really asked to do.
The normal task for your script is to react upon parameters given to it, following an agreed behaviour, and then write something to stdout.
Another common agreement says that your script should write a valid HTML page to stdout, whatever that is defined as.
A CGI script is actually a rather 'dumb' piece of code, with no direct interaction with the client browser.
The http server, which is capturing what your script wrote, will try to send that output to the IP address that sent the request, to the port indicated in the same request.
The server may eventually detect that no one received what it sent down to the client (browser) but not even this is absolutely garranteed. (Think proxies, etc.) Anyway, your script would never know, because it has already terminated.
The user of the client browser may eventually have closed the application (the browser) while your script is working hard to print something to stdout that no one will ever read. :-(
f--k the world!!!!
/dev/world has reached maximal mount count, check forced.