Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens when we refresh a web page?

Tags:

I was hoping if anyone can answer a fundamental question that I have regarding refreshing of a web page.

I have a dotnet webform where a user fills in some details and clicks submit. The code behind of the webpage has about 20 functions to perform.

Now assuming, when the user clicks the submit button the web page is executing the 5th function and meanwhile the user refreshes his browser;

What will happen to the already processing page? Will the page be terminated immediately? or will it be allowed to run till it executes the 20th function? or will the page running be destroyed and a new page created and sent to client?

Thanks for your answers.

like image 661
jack Avatar asked Oct 27 '09 15:10

jack


People also ask

What's the difference between reload and refresh?

When referring to the software on a computer, reload is synonymous with reinstall. 2. Also known as refresh, reload is a browser feature that provides users with the latest version of the web page. See our browser definition for further information about the reload button, and others.

Do Web pages refresh automatically?

Most modern browsers can be equipped with the feature to let you auto-refresh web pages on your computer. These methods even let you specify the duration on which they should reload the page for you. You don't need to be tech savvy to add the feature to your browser.

What does refresh mean online?

In the context of technology, refresh most commonly means to reload a web page or app in order to access the most recent or updated version of a display or feed.

Why is refresh important?

To show moving images, a television has to change out the pixels displayed on the screen. This is what we mean when we say the television refreshes the image -- it has to draw images in pixels so quickly that the human eye can't detect the process.


1 Answers

Once a request is made to the server from the browser the page is processed. Even if the user cancels or stops the request, the server continues to process the request. If the user reloads/refreshes the page, it's another request that will be executed in parallel with the first request.

Even in the case of PHP, the server isn't actively checking if the user has aborted the connection. The server only knows it's been aborted when it attempts to return the results of the request.

The internet is a disconnected environment. The server doesn't know anything about the browser. The only thing the server knows is a request has been made and it must fill the request.

like image 124
Chuck Conway Avatar answered Oct 07 '22 12:10

Chuck Conway