I was reading an interesting entry in Rocky Lhotka's blog when something in the url caught my eye:
http://www.lhotka.net/WeBlog/PermaLink.aspx?guid=b28971dc-ac4b-4494-8a21-7a5105a39b07I guess it's a DasBlog thing, but good lord: a globally unique ID in a blog hyperlink? Has it really come to this?
Dim g As Guid = Guid.NewGuid Console.WriteLine(g.ToString) 2ac6857d-6fa4-43f6-9145-dfffaf00fd7a
This is my GUID. There are many like it but this one is mine. My GUID is my best friend. It is my life. I must master it as I must master my life. Without me, my GUID is useless. Without my GUID I am useless.
It's bad enough that so many websites devalue the address bar with nonsensical geek-speak URLs...
- http://www.bestbuy.com/site/olspage.jsp?id=cat03037&type=category&navLevel=4&navHistory=cat00000%2Bcat03000%2Bcat03030
- http://www.amazon.com/exec/obidos/tg/detail/-/0821277545/ref=pd_nfy_b_nr/104-4632089-1596752?v=glance&s=books&n=283155
- http://listings.ebay.com/_W0QQa14Z1752QQalistZa14QQgcsZ1135QQpfidZ1413QQsocmdZListingItemList
- http://www.cnn.com/2004/WEATHER/09/11/hurricane.ivan/index.html
- http://www.subversivecrossstitch.com/lifesucks.html
- http://www.techreport.com/etc/2004q3/3dmark05/index.x?pg=1*
Building crappy URLs is just plain laziness. With the rich set of tools provided by IIS and ASP.NET, we should be leveraging 404 handlers and URL Rewriting to build URLs that are simple for people to understand, instead of taking the low road and building URLs that are easy for machines to understand.
My favorite technique is to map the 404 handler in IIS, per website, to /404.aspx. I can then intercept page not found errors with ASP.NET code and Server.Transfer them as I see fit. If you want a more robust solution at the ISAPI level, we've also used ISAPI Rewrite with great success.
* They should simplify this even further by making the default folder handler "index.x", then just.. http://www.techreport.com/etc/2004q3/3dmark05/?pg=1