Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
106 lines (87 sloc) 4.06 KB
<html lang="en">
<title>rev=canonical: url shortening that doesn't hurt the internet</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
html {
background-color: #000c82;
color: black; /* always set color if you set background */
body {
width: 640px;
margin: 0px auto;
font-family: Arial,Helvetica,sans-serif;
font-size: 16px;
#main { background-color: white; padding: 30px;}
h1, h2, h3 {
font-family: 'Helvetica Neue','Helvetica','Arial',sans-serif;
font-weight: bolder;
letter-spacing: -1px;
margin-bottom: 0;
h1 { color: #FFD700; }
p { margin-top: 0;}
code {
font-family: monaco, fixed;
font-size: 12px;
li {
font-size: 18px;
<div id="main">
<h1 style="display: inline;">RevCanonical</h1>
<div style="color: #FF5f1b; display: inline;">url shortening that doesn't hurt the internet</div>
{% if not link %}
<form method="get" action="">
<p><label for="url">Enter Web Address (URL) Here:</label></p>
<input type="text" name="url" id="url" value="{{ url }}" size="60">
<input type="Submit" name="Shorten" value="Shorten">
{% else %}
<p>Rev-canonicalized URL! <em>(hopefully shorter):</em></p>
<div><input type="text" value="{{ link }}" size="60"></div>
<p><small><a href="/">do another?</a></small></p>
{% endif %}
{% if error %}
<p>Whoops, we encountered an error: {{ error }}</p>
{% endif %}
<div id="explanation">
<p>RevCanonical is url shortening with a twist. Instead of creating its own super short versions of links, it checks to see if the link owner has published a shortened version of the given page using HTML link element. If not, we just return the original URL. And you should bug the link owner about providing a better alternative.</p>
<p>URL shorteners are as problematic as they are useful. They create <acronym title="Single Points of Failure">SPOFs</acronym>, that over any meaningful timeframe are guaranteed to create data loss, eroding the historical record. And then there are the privacy concerns. And the usability ones. See also <a href="">on url shorteners</a>
and <a href="">Solving the TinyUrl centralization problem</a>.</p>
<p>RevCanonical searches the referenced resource for:</p>
<li><code>&lt;link rev="canonical" href="..."&gt;</code> (i.e. "I am the canonical URL of that page over there")</li>
<li><code>&lt;link rel="alternate shorter" href="..."&gt;</code> (or truth be told any link rel including the string "alternate short*")</li>
<p>There is also an <a href="/api">API</a> version, which returns just the resulting URL.</p>
<p>Well sort of. There aren't many sites which support it, but there should be.</p>
<p>Check out the <a href="">RevCanonical blog</a> for more details about who support <code>rev="canonical"</code>, and why.
<!-- Not entirely true. There's at least -->
<p style="background-color: white; text-align:center; margin-top:5px; padding: 5px;">
<small>code by <a href="">kellan</a>, light design feedback by <a href="">jasmine</a>. another "30 minutes or less" production.</small>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-571486-6");
} catch(err) {}