Solved

How to detect if a client browser is still receiving data from a CGI script

Posted on 1997-01-08
1
224 Views
Last Modified: 2013-12-25
I have a situation where it would help if I could detect if a browser is still receiving data from a script. Perhaps STDOUT closes when a browser presses Stop or goes somewhere else? Are there any Perl functions that report on socket/handle status?

Thanks for any help!
0
Comment
Question by:AIRWOLF-mad
1 Comment
 

Accepted Solution

by:
glenk010897 earned 190 total points
ID: 1827533
The problem with the httpd/cgi protocol occurs when a user presses the Stop button on the browser. The web server that is responding to the request is given no immediate notice to abort its process. When a user aborts, the browser simply closes the socket that it had with the web server. The next time the server tries to write some data to that socket, it detects that the socket has been closed.

Yes there is a way - but you will have to change your implementation so that it first checks to see if the socket is still active.

For details plus sample Perl  code see the following page from the Genome Database website.

http://wwwtest.gdb.org/browser/abort/cgiAbort.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now