How does a web browser execute and process requests?

I would like to know how the browser executes / processes the request. I would like to know this because knowing how it works will help me understand how you can improve web programming that meets performance goals using browser features.

  • How do browsers load CSS, JS, and image files?

  • Does it load one resource at a time or several?

  • How many concurrent requests (connections) can it make?

  • What happens if the request is executed on the server and the user clicks the stop button? Will the execution be completed and the response will be returned? Or is the request halted on the server server?

  • How is JS execution performed by the browser?

Please add useful links / information if possible. Thanks everyone

+3
source share
2 answers

Please consider splitting this question into several questions. Here is some relevant information:

  • A web browser or any web client that wants to receive an HTTP resource will build a request GET. This contains information for routing the request to the appropriate server and information for indicating to the server which resource is being requested. The resource could be an HTML page, an image, a Javascript file, or something else.

  • When the browser receives the HTML page, the page may have links to other resources (for example, image tags). They instruct the browser to perform further requests.

  • . , (, ), HTML-, ( ). HTTP 1.1 , ( ).

  • Javascript , , .

+5
  • (, http GET ..).

  • , -.

  • ; , (, ). , . . , ( , , ).

  • , , ..

  • . script, . . (, ) , script . (IE defer script, , , script.)

+2

Source: https://habr.com/ru/post/1730755/


All Articles