Web intro
Idealistic Canadian video: How Does the Internet Work ?
A network is two or more computers connected. URLs are stand ins for Internet Protocol addresses (IP), which are numerical identifiers for devices connected to a network.
The internet is network of networks that connects devices.
Demo IP addresses:
- Find your IP
- Check another IP:
ping www.google.com
ornslookup www.uidaho.edu
- Follow your traffic: traceroute / tracert / tracepath
tracepath www.google.com
ormtr --report google.com
- Make a request:
curl www.google.com
For an in-depth, but fun intro, checkout Julia Evan’s Networking Zine.
What’s in a URL
https://example.com/about?key=value#anchor
protocol ://
domain .
top-level domain (optional port :80) /
path and filename ?
query with parameters #
fragment or anchor
- Protocol: there is actually more than 100 defined Internet Protocols, however with URLs the most common are Hypertext Transfer Protocol (HTTP) or File Transfer Protocol (FTP).
- Domain: the Domain Name System (DNS) is often described as a “phone book” that translates easy to understand web addresses into the appropriate IP addresses of servers with the desired information. A subdomain can be added in front of the main domain. For example, in
lib.uidaho.edu
>lib
is a subdomain ofuidaho
, which is a subdomain of the top-level domainedu
. Occasionally, you may see a port number at the end of the domain which refer to specific communication endpoints that the server is listening on. For the web the standard ports are:80
(http) and:443
(https). - Path and filename: these can be imagined like folders and files on the server (and actually are in static web sites). For example,
/about/index.html
, is the index file in the “about” folder. If no filename is given, by default the server provides the file namedindex
. - Query string: is added to the end of an URL following a
?
and is given in key value pairs. Multiple pairs can be separated by&
. The characters must be URL encoded / escaped, since some characters such as space are not allowed in URLs. The queries are processed by the server or javascript, so what exactly they do depends on the page. For example,/index.php?title=Query_string&action=edit
might return a wiki article in edit mode. - Anchor: are added to the end of a URL following a
#
. They traditionally correspond to specificid
on an html page, but are often used by javascript to add other functionality. For example,/index.html#Chapter1
might jump to a chapter heading in the web page.