1 00:00:00,000 --> 00:00:04,811 [MUSIC] 2 00:00:04,811 --> 00:00:10,511 What actually happens in between typing in teamtreehouse.com and seeing the website? 3 00:00:10,511 --> 00:00:14,684 If point a is the browser on your computer, and point b is a web server 4 00:00:14,684 --> 00:00:20,080 hosting teamtreehouse.com, everything in between is the cloud, right? 5 00:00:20,080 --> 00:00:21,800 Well, yes and no. 6 00:00:21,800 --> 00:00:25,950 In between each browser request and server response are one or 7 00:00:25,950 --> 00:00:29,810 multiple pieces of software, most of them speaking to each other using 8 00:00:29,810 --> 00:00:35,490 a common protocol called HTTP, or the Hypertext Transfer Protocol. 9 00:00:35,490 --> 00:00:37,820 Let's start with an overview of how the Web works, and 10 00:00:37,820 --> 00:00:40,830 then explore each step individually. 11 00:00:40,830 --> 00:00:46,250 Every website you've browsed started with a client sending a request to a server. 12 00:00:46,250 --> 00:00:50,120 A client is anything that can request a resource on the web. 13 00:00:50,120 --> 00:00:54,450 A few examples are computers, laptops, phones, and tablets. 14 00:00:54,450 --> 00:00:58,530 But even software programs themselves can be clients. 15 00:00:58,530 --> 00:01:03,940 When a client, you and your computer, types a URL into the address bar, 16 00:01:03,940 --> 00:01:06,080 you are sending a request to a server. 17 00:01:07,290 --> 00:01:13,060 The internet is a net of computers all connected together by various cables. 18 00:01:13,060 --> 00:01:15,910 It's made up of wires, routers, switches and 19 00:01:15,910 --> 00:01:19,280 satellites, connecting the network of servers together. 20 00:01:20,300 --> 00:01:23,560 These servers can perform a lot of tasks. 21 00:01:23,560 --> 00:01:28,150 A few server examples are web servers that host web sites, 22 00:01:28,150 --> 00:01:32,820 domain name servers that connect domain names with IP addresses, or 23 00:01:32,820 --> 00:01:37,120 mail servers that send and accept email messages. 24 00:01:37,120 --> 00:01:39,660 All of these things are considered part of the internet. 25 00:01:41,560 --> 00:01:47,300 Housed on servers are the files, folders and media that make up webpages. 26 00:01:47,300 --> 00:01:51,090 These files, folders and media are all software and 27 00:01:51,090 --> 00:01:54,080 are what we're talking about when we say the web. 28 00:01:55,320 --> 00:02:00,300 The web is the software that makes up websites, applications, 29 00:02:00,300 --> 00:02:04,600 games, wikis and videos that you can access on a web browser. 30 00:02:05,870 --> 00:02:09,590 As you know, there are a lot of different web browsers out there. 31 00:02:09,590 --> 00:02:13,480 Safari, Firefox, Chrome, and Internet Explorer to name a few. 32 00:02:13,480 --> 00:02:20,420 There are also many types of clients, mobile phones, apps, and games. 33 00:02:20,420 --> 00:02:24,500 In order for everyone to play nicely together, they have to speak the same 34 00:02:24,500 --> 00:02:31,250 language, and that language is called HTTP, or Hypertext Transfer Protocol. 35 00:02:31,250 --> 00:02:34,830 Nearly all HTTP requests start with you 36 00:02:34,830 --> 00:02:39,130 typing in a domain name like teamtreehouse.com. 37 00:02:39,130 --> 00:02:43,840 Servers, however, use numbers to locate each other, not words. 38 00:02:43,840 --> 00:02:49,391 These numbers are called IP addresses and work similarly to how phone numbers work, 39 00:02:49,391 --> 00:02:53,631 with each IP address pointing to a particular server on the Web. 40 00:02:53,631 --> 00:02:58,992 The service in the middle, between the domain name you type in and 41 00:02:58,992 --> 00:03:05,151 the IP address used by the server, is called a Domain Name Server, or DNS. 42 00:03:05,151 --> 00:03:11,399 Once the DNS finds the IP address or phone number you asked for with the domain name, 43 00:03:11,399 --> 00:03:16,231 it rushes your request along to the server hosting the website. 44 00:03:16,231 --> 00:03:21,619 For now, we can think of this request as a stamped, self-addressed envelope 45 00:03:21,619 --> 00:03:27,350 sent to the website's IP with a return address of your computer's IP. 46 00:03:27,350 --> 00:03:31,209 When the envelope is delivered to the server hosting the website, 47 00:03:31,209 --> 00:03:36,380 the server sends the envelope back to you with the website you wanted. 48 00:03:36,380 --> 00:03:42,150 When this happens, the HTTP trip is over and you have the thing you asked for. 49 00:03:42,150 --> 00:03:46,930 Now that took a long time to explain, but usually this all happens very quickly, 50 00:03:46,930 --> 00:03:50,580 like, in under a second, and it's getting faster all the time. 51 00:03:50,580 --> 00:03:54,850 Now that we're familiar with the process of what happens when we surf the web, 52 00:03:54,850 --> 00:03:57,090 let's break down each step in more detail.