What Happens when you type google.com in your browser

讨论各种类UNIX,如 Linux distributions,OpenSolaris,Minix,GNU/kFreeBSD,GNU/Hard;广义的计算机与数码设备;Life,the Universe and Everything.

版主: wkx9dragon

回复
头像
acheng
锌 Zn
帖子: 581
注册时间: 2011-07-07 21:52

What Happens when you type google.com in your browser

帖子 acheng » 2015-01-24 13:44

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

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 0 访客