Shrinking URLs down

by Michael S. Kaplan, published on 2005/11/09 15:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/11/09/490792.aspx


I know people like to talk about things like TinyURL, but I am talking about something different, something I found out the other day when looking at a URL that Raymond Chen had made to a blog post (which they put in an email).

Take for example the link to this post -- it is:

http://blogs.msdn.com/michkap/archive/2005/11/09/490792.aspx

It turns out that out of all of that the only things that are important are the URI:

http://blogs.msdn.com/michkap/archive/2005/11/09/490792.aspx

and the final file name of the post:

http://blogs.msdn.com/michkap/archive/2005/11/09/490792.aspx

So you can actually just use:

http://blogs.msdn.com/490792.aspx

or if you want someone to know whose blog it is you can use:

http://blogs.msdn.com/michkap/490792.aspx

You could have a little fun in the middle with no harm done:

http://blogs.msdn.com/thisspaceforrent/490792.aspx

http://blogs.msdn.com/something-obnoxious/490792.aspx

http://blogs.msdn.com/this-URL-is-getting-longer-and-longer-all-the-time-and-I-wonder-when-it-will-end/490792.aspx

Hell, you can even play a small game with spoofing that name to make it look like the link is to someone else's blog:

http://blogs.msdn.com/oldnewthing/490792.aspx

http://blogs.msdn.com/jledgard/490792.aspx

http://blogs.msdn.com/jobsblog/490792.aspx

or you can make someone from the inactive list seem to come alive again. Like saying about how cool it is that Brett is finally posting:

http://blogs.msdn.com/brettsh/490792.aspx

Of course, once you click on it, you are right back where you started.

I guess nothing is foolproof; thankfully, it ends up sending you to the real post rather than just transferring and keeping the old link in Address Bar -- or I would call it a pretty dangerous identity theft style spoofing bug!

I am sure people would get tired of bogus links quickly enough. But it was pretty cool there for a moment....

Right now I imagining how this post will look if they change the behavior in the future. Ah well, to readers of the future who are confused at why I am going on about something that does not work, I swear it did work once!

(Special thanks to Douglas R. Hofstadter and the chapters of Metamagical Themas that talked about self-referential sentences, which helped inspire the next URL)

http://blogs.msdn.com/this-post-refers-to-itself/490792.aspx

:-)


# Rosyna on 9 Nov 2005 3:18 PM:

C|Net does something similar to this as well. They put the article headline in the URL so that randomly pasted links in places have context. The url can be changed to whatever you wish. Like

http://news.com.com/Someone+set+us+up+the+bomb/2009-1010_3-5937568.html

We at unsanity kind of some something similar.

http://www.haxies.com/windowshadex.xhtmlaspxphparchiebunker

# Mihai on 9 Nov 2005 10:29 PM:

I use to do the same for Amazon:
http://www.amazon.com/gp/product/0672319772/103-6443813-9308624?v=glance&n=283155&vi=joelonsoftware">http://www.amazon.com/gp/product/0672319772/103-6443813-9308624?v=glance&n=283155&vi=joelonsoftware
can be replaced by the friendlier:
http://www.amazon.com/gp/product/0672319772

# Michael S. Kaplan on 10 Nov 2005 2:09 AM:

Note that Joel will lose his Amazon Associates bonus if you remove that last piece.... :-)

# Simon on 10 Nov 2005 2:50 AM:

Your reference to Hofstadter reminds me of a programming project I wanted to work on once: a script that creates a webpage with links to all the pages on the same site that do not link to themselves.

Do you think that would make a good interview question?

# Mihai on 10 Nov 2005 4:27 AM:

The interesting part is that I have found that link not from Joel, but from Amazon.

Try this:
- go to www.amazon.com
- type vb internationalization kaplan
- you get 3 results
- http://www.i18nwithvb.com
- the link posted previously
- http://www.vb-helper.com/tut9.htm

I made sure that I have search on Amazon.com enabled, and not the web (where I get a lot of links).

This means that sometimes someone can get a bonus even if I don't come his link!
Nice bug!

# Michael S. Kaplan on 10 Nov 2005 8:52 AM:

Hi Simon --

But who links to the Spanish barber's web site? :-)

# Michael S. Kaplan on 10 Nov 2005 8:54 AM:

Hi Mihai -- Ah, that is interesting.... I had no idea that they would do that. Is it a bug, do you think?

# Mihai on 11 Nov 2005 12:15 PM:

"Is it a bug, do you think?"
Depends who you ask :-)
I would say is a bug, Joel would say is a feature :-)

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2007/09/03 SIAO: As unofficial as you can get without a prescription

go to newer or older post, or back to index or month or day