This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes What happens if a browser is shut down after an HTTP request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What happens if a browser is shut down after an HTTP request" Watch "What happens if a browser is shut down after an HTTP request" New topic
Author

What happens if a browser is shut down after an HTTP request

Pat Rak
Greenhorn

Joined: Oct 02, 2002
Posts: 2
This is probably a kindergarten-level question and I still don't know the answer:
What happens if I type in the address to an HTML page or a servlet, then press enter to submit the HTTP request and then immediately close the browser.
Are the HTTP request and the web server response part of the same session or are they independent?
If I shut down the browser, do the web server /servlet engine:
(a) immediately abort the sending back of the HTML?
OR
(b) they still send the data bytes to a no w invaid destination and the bytes get lost somewhere on the internet?
OR
(3) they send the data bytes to an output stream from their point of view but on the computer system / TCPIP level, nothing goes out of the computer port because the output stream is now dead?
I think the answer is number 3 but not sure.
Thanks,
prak
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
The webserver will not know that the browser has been closed until it tries to send the response, in whic case an exception will be thrown.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
prak78821
Welcome to the JavaRanch! Please adjust your display name to meet
the JavaRanch Naming Policy. You can change it here.
Thanks!
and welcome to the JavaRanch!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What happens if a browser is shut down after an HTTP request
 
Similar Threads
Listening for connections
Multiple response for a request
Loading problem with t:inputFileUpload
keep-alive or persistent connection
need some clarification about keep-alives and content-lengths