File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Pat Rak
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic