Behavior of browser termination during communication between web browser and server

Asked 2 years ago, Updated 2 years ago, 40 views

The client enters a domain, receives information from the server, and displays it in a web browser I'm a studious student!
But suddenly, while communicating with the server, I'm curious how it works if you click the x mark at the top of the browser and exit the browser, so I'm asking you a question!

server web

2022-09-21 10:04

1 Answers

"I just asked because I was curious" was written elsewhere.

When you attempt to send a request even though the TCP connection is closed, the behavior is completely different depending on what the server software is. For example, if you are sending data while a dynamic script is running, let the script know (*abort) that the loading is interrupted, and then let the script language take care of it. (By default, PHP just shuts down) When the script runs out, or if it was a static file request, it just returns the result whether the connection is closed or not.


2022-09-21 10:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.