I’m finally revisiting, reviewing, and taking notes from this , so this post will have some overlap with this previous one, as well as this one.
Such a transaction might proceed like this:
- you enter a URL into your web browser
- your browser sends the request (some text) to your device’s network interface
- the request goes over the internet where a search for the URL (and associated IP address) begins
- eventually, the server accepts the request, parses it, and sends a response over the internet back to your network interface, which hands it to your browser
- your browser processes the HTTP response strings and displays them in the form of a web page
HTTP is a stateless protocol in that each request-response pair is completely independent of the previous one: the server doesn’t need to hang on to information (i.e., state) between requests. HTTP is stateless, but a stateful experience can be (and often is) simulated by employing various web development frameworks.
The Domain Naming System (DNS) is a distributed database which translates URL names to their respective IP addresses and maps the request to a remote server. DNS databases are stored on a worldwide network of hierarchically organized DNS servers; no single DNS server stores the entire database.
What is a URL?
|scheme||Tells the client how to access the resource (http, ftp, mailto, git)|
|host||Tells the client where the resource is hosted or located|
|path||Shows what local resource is being requested|
|port number||Is used by the host to listen to HTTP requests|
The default port number for HTTP is 80, and although it’s not always specified, it’s assumed to be part of every URL. To use anything other than the default, it has to be specified in the URL.
A query string or parameter within the URL usually contains some form of data to be sent to the server. A simple URL with query strings might look like: http://www.example.com?search=ruby&results=10
|Query string component||Description|
|?||A reserved character that marks the start of the query string|
|search=ruby||A parameter name/value pair|
|&||A reserved character that's used to separate multiple parameters|