Web - URL


An Uniform Resource Locator (URL) is a universal identifier for a resource.

Because the resource can be created dynamically, an URL is also logically a request.

It's the string that is understood by a browser when you put it in the address bar.

When the HTTP protocol is used as scheme, it's a identifier for a Web resource.

An URL was originally created to provide a method for finding an item such as a person's street address.

On a format level, the URL is a subset of an URI.

Mr. Berners-Lee, the creator of the Web’s bedrock software standards, would get rid of the double slash “//” after the “http:” in Web addresses. The double slash, though a programming convention at the time, turned out to not be really necessary, Mr. Berners-Lee explained.


scheme://[[email protected]]host[:port]/path?query#fragment






Lowest common denominator max URL length among popular web browsers is 2100 (Reference)


An URL shortener is an application that creates a shorter URL.


  • the URL is added to a table with a numerical id
  • with optionally a hash of the URL (to fasten the lookup by hash URL)
  • the numerical id is used in the new shorten version

The numerical id based on the decimal system is generally converted to a greater base (ie above 10 with characters ) making it shorter. The hashid library being the most known example.

How to create an identifier

You can create unique same-length identifier via hashing

Note that the version 3 and 5 of UUID specification have an url namespace to create a url hash.

How to get the url of the actual HTML page with Javascript


Documentation / Reference

Powered by ComboStrap