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,
  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
    • Open a website, meh
  • file://path
    • Open a file in your local machine
    • Open email
  • telnet://
    • 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.厉害 (Thanks @jxerome for pointing that out)


Talk to me at Twitter

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

Top comments (1)

annlin profile image
ann lin

I am absolutely sure that it is a typo. 🤦