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...
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
Simple URLs are great when your content is organized hierarchically and your URLs are hackable. If you hack
hurricane.ivan/index.html
off of the cnn.com URL,
http://www.cnn.com/2004/WEATHER/09/11/
you might expect to find weather information for September 11, 2004. However, neither the cnn.com URL nor the techreport.com URL are hackable. Not great examples.
If your URLs aren't hackable, there isn't much point in making them simple, unless maybe you're storing or exchanging them without metadata.
Colin on September 29, 2004 12:30 PMOne could make a fairly strong argument that URLs really don't matter anymore. How does most of the net population find things? Google. Does the URL matter when they use a bookmark or favorite? Nope.
Aaron on September 29, 2004 12:41 PM"You're as lazy as the ones you critizise."
That's true! Unfortunately I don't have time to retrofit a bunch of PERL code into Movable Type to do something like...
http://www.codinghorror.com/blog/DontDevalueTheAddressBar.htm
.. but you're right. If this was an ASP.NET codebase, I probably would do that.
Jeff Atwood on September 30, 2004 2:02 AMcnn.com's URL looks like it's more for cosmetics than actual function. I know that when I have that URL in my address bar that I'm looking at September 11th, 2004 weather information.
Simple URLS are also easier to remember. You don't always have your favorites or bookmarks handy (though things like furl make this easier). That's why those URL shrink sites are more popular. They take an insanely long and complex URL and shorten it into something that's somewhat easier to remember.
Jeremy Brayton on September 30, 2004 2:04 AMhey man, first check the url of YOUR post:
http://www.codinghorror.com/blog/archives/000093.html
why can't it be:
http://www.codinghorror.com/DontDevalueAddressBar.htm
????? You're as lazy as the ones you critizise.
CS' on September 30, 2004 6:10 AMHerersquo;s an effective piece on this subject: http://www.w3.org/QA/Tips/uri-choose
Nils Jonsson on September 30, 2004 10:47 AMSupposedly, a good URL with words separated by hyphens can help out a page's ranking in Google. Also, when you're looking at your web site statistics, it's a whole lot easier to identify the articles that people are looking at.
Chris Lundie on October 1, 2004 4:03 AMServer.Transfer ; not Response.Redirect. Server.Transfer doesn't send the browser anywhere so the URL is not modified.
Jeff Atwood on October 5, 2004 10:43 AMI've found adding a GUID helpful to break caches... sometimes it seems to be the only way.
Stormy on November 12, 2004 3:07 AMLuckily you don't have to. Check out your "Weblog Config" - "Archive Files" page. My settings:
Individual: daily/$MTEntryDate format="%Y/%m/%d/"$$MTEntryTitle dirify="1"$.html
Daily: daily/$MTArchiveDate format="%Y/%m/%d/index.html"$
Monthly: daily/$MTArchiveDate format="%Y/%m/index.html"$
That way the title is part of the URL (which is good for Google anyway), and truncating the URL works entirely as expected. Not too terribly difficult.
Richard on March 24, 2005 5:26 AMThe "URL Rewriting" link is broken.
Guy on November 6, 2007 9:44 AMSupposedly, a good URL with words separated by hyphens can help out a page's ranking in Google. Also, when you're looking at your web site statistics, it's a whole lot easier to identify the articles that people are looking at.
http://stroybalans.ru/
Your favorite for 404 errors is to redirect? So I lose the url I typed? So... if I had a typo I'm out of luck? That's not very address bar friendly is it?
Anon on February 6, 2010 9:30 PMThe comments to this entry are closed.
|
|
Traffic Stats |