Description
Get Short URL will check to see if the link provided has published a shortened version of the given page using an HTTP or HTML link header element. If not, we just return the original URL.
Details
Get Short URL returns the shortest result of the referenced resource, looking at:
HTTP Headers
-
Link <...>; rel="shorturl" -
Link <...>; rel="shortlink" -
Link <...>; rel="canonical" -
Link <...>; rev="canonical"
HTML Headers
-
<link rel="shorturl" href="..."> -
<link rel="shortlink" href="..."> -
<link rel="canonical" href="..."> -
<link rev="canonical" href="...">
Where ... is the short url.
API
There is also an API version, which returns just the resulting URL.
Ubiquity
There is also a Ubiquity command for the api.