课程: Web Programming Foundations
Welcome
- If you're like me, you spend part of your day touching or clicking on links and typing URLs in the address bar of your favorite browser. Many of our daily interactions with information, businesses, and services now happen over the World Wide Web, and the majority of them happen in a good old web browser on a computer or mobile device, which begs an important question. What exactly happens when you type a URL in that address bar or click on a link to a webpage? And how are these websites and applications put together in the first place? Knowing how the internet works and how to work with it, all the way the from the code editor to the mobile browser and beyond, is essential to anyone wanting to publish their ideas on the web. The best place to start is with something you already know, the browser. So, what happens when you type a URL in an address bar or click on a link? Well, the URL functions as an address to a server. That server holds a document written in a markup language the browser can understand. That document in turn links to other files on the server and on the web, including images and videos, a style sheet describing what the content should look like, and maybe some JavaScript to add interactivity. Those files were created by web designers and developers in accordance with strict rules of web standards, content hierarchy, and accessibility to make them easy to parse for servers and browsers and easy to read and understand for humans. When you type that URL and press enter or click that link, a request is sent to the server to get that document and all its related files. The browser receives everything and displays the document and its referenced images and videos in accordance with the style sheet and with the interactivity described in JavaScript. What you have now is a local copy of the web document running in your browser. Unplug the web, and the page persists. Reconnect the web, click on a link, and the whole process starts over. That was the high-level version. Now it's time to dig in and really understand all the pieces that make up the web we all know and love. Let's get cracking.