How do websites work?


How does a website get to my computer?
  1. First, you type a URL (uniform resource locater) into your browser, like www.abc.com/johnsHomePage/. This is sent to your DNS (domain name server), which is generally assigned to you dynamically (meaning, your ISP [internet service provider] gives its address to you each time you connect).

  2. The DNS finds an IP (internet protocol) address to match the given domain, in this case "www.abc.com". Your broswer then points itself to that IP address.

  3. When your URL reaches the web server at the given IP address, the server examines the arguments of the URL, in this example "/johnsHomePage/". The server also makes a quick note of who asked for these files, which contains your IP address (you have one whether you realize it or not).

  4. The server has either a directory called johnsHomePage in the webserver documents, or their is a link to the files for "johnHomePage". The server finds the files in this directory and returns to you the file you requested. Since you didn't request any file, it returns the index for the directory, usually called index.html (HTML means hyper-text mark-up language).

  5. The information from the index and any necessary pictures or other media is sent back to the orinating IP address (your computer) and is interpretted by your broswer.

  6. Your broswer displays whatever it gets back to the best of its ability. This means that webpages return mark-up language for the presentation information, like a edittor might write mark-up requests on a newspaper article. The browser reads the mark-up, like a newspaper producer might read the mark-up, and your broswer displays what it made of the mark-up, just as a newspaper is printed with headlines, subtitles, pictures, etc. Because your computer assembles according to its own abilities, you might see a website much differently than someone else. If you ever received Javascript errors, then your computer probably wasn't processing a website exactly as the designer expected. (Actually, Javascript isn't a mark-up language at all; its a scripting language used with HTML. Regardless, it is completely assembled by your computer, not the server.)