Modern Chrome Web Browser Device (Part 2/4)

This is part 2 of 4 that looks at the inner workings of Chrome. In the previous part, we looked at how different processes and threads work with different parts of the browser. In this post, we'll take a closer look at how each process and thread interact to render a website.





Part 1

Part 2 (current)

Part 3

Part 4



About translation features
  • , , .. () . β€” , - . : *-, *-. , , , , , .
  • , , , , . "" , .


-: URL , . , , β€” .



*- (browser process)



, , , *-. *- , *UI- (UI thread), , *- (network thread), , *- (storage thread), . URL , *UI- *-.



image



1: , *- *UI-, *- *-





= 1.



, , *UI- " URL?". Chrome , *UI- , , , .



image



1-bis: *UI- , URL-



= 2.



Enter, *UI- . , *- , DNS TLS .



image



2: *UI- *- mysite.com



*- , , HTTP 301. *- *UI-, . URL-.



= 3.



(payload, ) , *- . 'Content-Type' , , , MIME-. " ", . , , 'content-type/payload'



image



3: , Content-Type ,



HTML-, *-, zip- - , , , .



image



4: *- , HTML



SafeBrowsing. , , *- . , Cross Origin Read Blocking (CORB), , *-.



= 3. *-



, *- , , *- *UI-, . *UI- *- -.



image



5: *-, *UI- *-



, . *UI- URL *- 2, , . *UI- *- . , , *- , *- . , , .



= 4.



, *- , IPC *- *- . , *- HTML-. *- , *- , .



, . , "" "" , . / , .



image



6: IPC *- *-,



= .



*- . , , . *- "" , IPC *- ( , ). *UI- .



"" , JavaScript .



image



7: IPC- *- *- , "".





! , URL ? , , . , , , beforeunload.



beforeunload " ?" . , JavaScript , *-, *- *-, .



: beforeupload. , , . , , , , .

image



8: IPC- *- *-, ,



*- (, JavaScript window.location = "https://newsite.com"), *- beforeupload. , . , *- *-.



, , *- , *- , . , Page Lifecycle API.



image



9: 2 IPC- *- *-, *-



Service Worker (*-)



service worker. *- β€” ; - , . *- , .



, *- β€” JavaScript-, *-. , *- *-?



*- , *- ( The Service Worker Lifecycle). , *- *-, *- URL, *UI- *-, *-. *- , , .



image



10: - \-



image



11: *UI- *- *- *-; *- *-



(Navigation Preload)



, *- *- , *- . Navigation Preload β€” *-. , ; , .



image



12: *UI- *-, *- *-





In this post, we looked at what happens during navigation and how your web application code, such as response headers and client-side JavaScript, interacts with the browser. Knowing the steps a browser goes through to fetch data from the web makes it easier to understand why APIs such as the Navigation Preload were developed. In the next post, we'll dive into how the browser handles HTML / CSS / JavaScript to render pages.



Part 1

Part 2 (current)

Part 3

Part 4




All Articles