From the course: Web Programming Foundations

From URL to website

From the course: Web Programming Foundations

Start my 1-month free trial

From URL to website

- Let's start at the very beginning. You open your web browser, type in a URL in the address bar and hit Return. What happens? With any luck, the website loads in the browser and you can read, view or listen to the content you were looking for. But what really happens? Let's start with that address bar and what you put in it. Whether you type out a web address yourself or click on a bookmark or follow a link, the address bar is filled with a URL, or Universal Resource Locator. This URL is quite literally a locator following a universal standard that points at a specific resource somewhere on the web, and that resource is the document you're trying to access and all it's associated assets, and that somewhere is a server connected to the internet somewhere in the world whose IP address is mapped to the domain you used in a DNS, or Domain Name Server. Here's how all of that works. A URL is entered in the address bar. When the user hits Return or touches the button on their phone or something else, the browser sends a get request to this URL, which asks the server on the other side to send back all the data it has. The URL is sent to a domain name server, known more commonly as DNS. The DNS figures out which IP address the domain is pointing at, and passes the request to the server on that IP address. The server retrieves all the data, aka the resource, and sends it back to the browser. The resource received by the browser is in all likelihood an HTML, or Hypertext Markup Language document. HTML is the universal document language for the worldwide web. This HTML document contains all the contents of the page as well as references to media items like images, audio and video. It also contains links to cascading style sheets, or CSS, containing instructions on how the content should be displayed in the browser, and possibly JavaScript, small programs that run in the browser. Finally, the browser puts the HTML and CSS and JavaScript together and paints the view you see in the viewport, the space inside the browser where the web is displayed. All of this back and forth and putting together happens really fast, usually in a few seconds or less, and most of it is automated and largely out of our control. Front-end web development is focused on how to make the stuff that ends up in the browser. Knowing how it gets there helps explain some of the things we do when we build the creations that live on the web.

Contents