Ever wonder how a link work? Below is the answer provided by Tim Berners-Lee himself.
Actually, it was a grown up who asked this very reasonable question. When you understand this, then you will understand the difference between the Internet and the Web. And you will realize that it is all quite simple! :-)
(You can skip the bits in small type)
When you are reading a web page, the computer isn't showing you everything about the link. Behind the underlined or colored bit of text which you click on is an invisible thing like http://www.w3.org/. Its called a URL. This is the name of the web page to which the link goes. (The web page you are reading has this one: http://www.w3.org/People/Berners-Lee/kids). Behind each link, hidden from you, is the URL of the other web page, the one you'd get to if you followed the link.
When you click on a link, your computer takes this URL. It wants to get a copy of the web page. There are a few different ways of doing this. The one I'm going to tell you about is just used for URLs which start http: . (This whole recipe I'm going to tell you, which your computer uses for getting web pages, is called the HyperText Transfer Protocol. That's what HTTP stands for. There are other protocols. But this is the most common one. )
If the URL starts with http:, then the computer takes the next bit of the URL, between the // and the /. It might be www.w3.org for example. This is the name of the web server. However, It can't communicate with the web server until it knows its computer number, because the Internet actually works with numbers. (A computer number is actually called its Internet Protocol Address, or IP Address. It is normally written as four numbers with dots, like 192.168.0.1)
So there will two stages to this - first, finding out the number of the web server, and then asking the web for a copy of the web page.
Your computer makes up a packet of information. An Internet packet is a message, a bit like a short email or a long text message. The packet starts off with the number of the computer the packet is going to, and then the number of the the computer which sent it, and then it has what the packet is about, and then whatever it is one computer is sending to the other.
Now all over the Internet there are special computers whose job is to keep a list of computer names and numbers. When your computer is set up, it is set up to know the internet number of one of these. Your computer sends off the packet to it, saying it wants to know the number of
http://www.w3.org/. (A computer which can look up computer names -- domain names as they are called -- is called the Domain Name Service (DNS) server in the network preferences if you really want to know. When a DNS server looks up a computer name, it either knows it because it has it in a list, or it just asks another DNS server which knows more names.)
How does the packet get there? Simple. Your computer sends it down the ethernet connection or phone line from your computer, or it transmits it by radio to a base station which sends it down some wire. Whatever that wire goes through, eventually it connects to some other computer (maybe one in the cable company, or phone company).
The Internet is a net -- really shaped like real net like a fishing net -- of computers all connected together by various cables. Each computer, when it gets a packet, looks at it and sees what computer number it is being sent to. It then just passes it on to the next computer in the net, in the general direction toward its destination. Pretty simple? yes, well, it is simple. The packet gets passed on until it gets to its destination. Typically, a packet might be passed on by more than 10 computers before it arrives.
(This way of getting a packet to its destination is called the Internet Protocol (IP))
In this case, the destination was the name server. The name server looks up the number of the computer www.w3.org from its name.
Of course the name server knows the number of your computer, because that was in the packet too. So it sends a reply packet to tell you computer the number it needed.
Ok. Your computer now knows the number of the web server, www.w3.org. So it goes back to the URL -- remember the thing which started with http:? Lets say the URL behind the link was http://www.w3.org/People/Berners-Lee/FAQ . It has used the www.w3.org bit to find the number of the web server which has a copy of the page. Now it send off a request to that server asking it for the web page. It sends the whole URL, and the server sends back a copy.
The only problem is that the web page won't fit in a packet. Packets can only be around 512 bytes - about long enough for a text message of 500 characters. Even the request that your computer sends off can be longer than will fit in a packet. So what happens is the computer just breaks the message into parts, and sends each part in a packet. I told you this isn't rocket science. It just like a television series coming in installments. It also puts in each packet a packet number so that the other computer can make sure its got all the parts and got them in right order.
(This method of splitting message sup into packets and putting them back together again has a name, which you don't have to remember. It is Transmission Control Protocol, or TCP. So that's what people mean when they talk about TCP/IP.)
So your computer gets back a bunch of packets with bits of the web page in them. It puts them in order and displays them on your screen. There are special codes (called HTML tags) which tell it when to do things like headings and bold and italics and ... oh, of course... links. Yes, every time it finds the HTML tag for a link, it displays the text specially (like blue and underlined) and makes a note of the URL of the linked page. Because at any time, you could click on the link, and it'll be doing this stuff all over again.
@@@ This really needs lots of nice diagrams @@@