Well, have you ever actually thought about it? What technically happens, “behind the scenes” so to speak, when you use your keyboard, type Google.com into your web browser, and hit the enter (return) key? Have you ever thought about it? Well, someone over at GitHub has actually posed that question. And thanks to lots of people’s contributions, we actually are close to having the correct answer:
What Happens When You Type Google.com Into a Web Browser?
Taking a look at the project, right now there are at least 20 things that happen during the process. Sure, it looks as if it takes only seconds to get to Google.com in your web browser. But there are TONS of things that happen, technically, behind-the-scenes.
Let’s take, for example, what happens when you actually hit the enter key with your finger:
…enter key on the keyboard hitting the bottom of its range. At this point, an electrical circuit specific to the enter key is closed (either directly or capacitively). This allows a small amount of current to flow into the logic circuitry of the keyboard, which scans the state of each key switch, debounces the electrical noise of the rapid intermittent closure of the switch, and converts it to a keycode integer, in this case 13.
Information is then sent to the app.
Is it a URL or a search term?
A DNS lookup occurs.
TLS handshake…
TCP packets
HTTP protocol…
And so on.
So, we take for granted sometimes that we can just type something into our web browser and hit the enter key. And we get to our destination, a website like Google.com. But have you actually thought about what’s really happening? In milliseconds?