Two-faced URLs

Dev tools

url shortener

SHOW HN2011

Two-faced URLs

This is a URL shortener that gives a link that sends "preview" processes one place and actual users…

brokenthings.org

#url shortener#link preview#user agent#content negotiation

85points
16comments
#137of 1,097 in 2011
Top 13%of 2011 by points

How HN took it

MixedNo clear lean

5 positive, 2 neutral or asking, 0 mixed, 2 critical, out of 9 comments about the project. Thread score +0.23.

Execution: 3 for, 1 againstIdea: 1 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clever routing based on headers and bot detection

    From 3 comments
    • Clever use of content negotiation!
      inportb on HN
    • Very clever/sneaky!
      makethetick on HN
    • Clever. I assume the only way for Facebook and Twitter to circumvent this would be to fake all of the HTTP headers sent by, say, a modern version of Firefox. I don't think it's…
      phillco on HN
  • Useful for setting custom link previews

    From 1 comment
    • This actually could be quite useful. Sometimes people need to post a nicely described link with an adequate thumbnail, yet the Facebook bot finds only some random image. With…
      bgarbiak on HN

Objections

  • URL shorteners are harmful and should be eliminated

    From 1 comment
    • Yet another reason for URL shorteners to be banished from the web (not that this will ever happen). Besides the arcane input requirements of Twitter and the semi-retarded…
      pak on HN
  • Preview bots could be defeated by caching or faking headers

    From 2 comments
    • To defend against this, social networking sites should simply cache the link that the preview bot sees, and send users there directly instead.
      jasondavies on HN
    • Clever. I assume the only way for Facebook and Twitter to circumvent this would be to fake all of the HTTP headers sent by, say, a modern version of Firefox. I don't think it's…
      phillco on HN

Questions

  • How does it distinguish HEAD and GET or bot requests?

    From 2 comments
    • At a guess: HEAD requests give one URL, GET requests give another?
      rmccue on HN
    • I think it knows the user agent of specific bots and serves different pages based on that, as social networks tend to do a full GET request in order to grab a screenshot.
      MattBearman on HN

Alternatives named

  • Twitter's own link handling

    From 1 comment
    • That's one thing that mildly annoys me about twitter. It clearly knows where a shortened link is heading because it reveals the full URL on the mouseover. Given that information,…
      billpg on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/2734360)