Hacker News new | ask | show | jobs
by dragonwriter 4402 days ago
> The server might not know the long URL since all that t.co knows about is the slate.me URL

The server at t.co could send a request (HEAD works) to slate.me, and follow up any redirects it gets to resolve the final URL. (This could be done just by following until no more redirects, or only sending requests to known URL shorteners -- there's advantages and disadvantages to both) -- and you don't need any new HTTP verbs to do it.

1 comments

That assumes that every user gets the same "long" URL for a particular "short" URL (and that every 30x corresponds to a short-to-long redirect). It falls down where a URL depends on geolocation or time sensitivity.
The alternative I presented of only follow redirects from known URL shorteners addresses pretty much all of that.