DEV Community

ann lin
ann lin

Posted on • Updated on

What happens when you enter URL in a browser [Part 1: URI]

What really happens,

  1. Enter a website link in the browser, www.example.com.
  2. Browser knows it's a website and adds https:// in front of it.

https:// is one of the many URI Schemes


URI = Universal Resource Identifier
URL = Uniform Resource Locator
URN (not that urn 🌝) = Uniform Resource Name

URN and URL are subsets of URI. URN is just a name or a reference, there may not be a way to locate that thingy. URL knows exactly where the resource is located and returns that thingy.

URL Example (paste on your browser):

  • data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D
    • Hello, World!
  • tel:+6598765432
    • Open facetime in computer, call number in mobile device
  • https://example.com
    • Open a website, meh
  • file://path
    • Open a file in your local machine
  • mailto:test@gmail.com
    • Open email
  • telnet://0.0.0.0
    • Open terminal to log into remote computer
  • and more over here

URN Example:

  • urn:isan:0000-0000-9E59-0000-O-0000-0000-2
    • The URN for "Spider-Man (film)", identified by its audiovisual number

This concludes part 1 of "What happens when you enter URL in a browser".

P/S: Current browsers are already using Internationalized Resource Identifiers (IRI), a new protocol which is an extension of URI, which allows unicode character encoding. E.g. https://en.wiktionary.org/wiki/厉害 (Thanks @jxerome for pointing that out)

References:
https://www.immagic.com/eLibrary/ARCHIVES/GENERAL/WIKIPEDI/W110302U.pdf
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

Talk to me at Twitter

🤦: Thanks for pointing out the mistakes in the post! @joeflateau , @dangtu_work

Top comments (1)

Collapse
 
annlin profile image
ann lin

I am absolutely sure that it is a typo. 🤦