分页: 1 / 1

What Happens when you type google.com in your browser

发表于 : 2015-01-24 13:44
acheng
Hackerews上看到的:
https://github.com/alex/what-happens-when
This repository is an attempt to answer the age old interview question "What happens when you type google.com into your browser's address box and press enter?"

Except instead of the usual story, we're going to try to answer this question in as much detail as possible. No skipping out on anything.

This is a collaborative process, so dig in and try to help out! There's tons of details missing, just waiting for you to add them! So send us a pull request, please!

This is all licensed under the terms of the Creative Commons Zero license.



Table of Contents
•The "enter" key bottoms out
•Interrupt fires [NOT for USB keyboards]
•(On Windows) A WM_KEYDOWN message is sent to the app
•(On OS X) A KeyDown NSEvent is sent to the app
•(On GNU/Linux) the Xorg server listens for keycodes
•Parse URL
•Is it a URL or a search term?
•Check HSTS list...
•Convert non-ASCII Unicode characters in hostname
•DNS lookup...
•ARP process
• Opening of a socket ◦UDP packets

• TLS handshake ◦TCP packets

•HTTP protocol...
•HTTP Server Request Handle
•HTML parsing
•CSS interpretation
•Page Rendering
•GPU Rendering
•Window Server
•Post-rendering and user-induced execution