![]() ![]() Loading spinner is displayed on the corner of a tab, and the network thread goes through appropriate protocols like DNS lookup and establishing TLS Connection for the request. When a user hits enter, the UI thread initiates a network call to get site content. Figure 1: UI Thread asking if the input is a search query or a URL # Step 2: Start navigation In Chrome, the address bar is also a search input field, so the UI thread needs to parse and decide whether to send you to a search engine, or to the site you requested. When a user starts to type into the address bar, the first thing UI thread asks is "Is this a search query or URL?". # A simple navigation # Step 1: Handling input When you type a URL into the address bar, your input is handled by browser process’s UI thread. The browser process has threads like the UI thread which draws buttons and input fields of the browser, the network thread which deals with network stack to receive data from the internet, the storage thread that controls access to the files and more. # It starts with a browser process Figure 1: Browser UI at the top, diagram of the browser process with UI, network, and storage thread inside at the bottomĪs we covered in part 1: CPU, GPU, Memory, and multi-process architecture, everything outside of a tab is handled by the browser process. In this post, we’ll focus on the part where a user requests a site and the browser prepares to render a page - also known as a navigation. Let’s look at a simple use case of web browsing: you type a URL into a browser, then the browser fetches data from the internet and displays a page. In this post, we dig deeper into how each process and thread communicate in order to display a website. In the previous post, we looked at how different processes and threads handle different parts of a browser. This is part 2 of a 4 part blog series looking at the inner workings of Chrome.
0 Comments
Leave a Reply. |