I think most site visitors are aware that some locomotives have a “Links” page providing links to other sites that have information about that particular locomotive. I am embarrassed to admit that, back in 2001 when this site was being created the liks pages were a bit of an afterthought.
I provided means for a site visitor to submit a link, and means for an editor to approve that submission. Though the Admin menu for Links had entries for Add, Edit and Delete, they were never written.
About three months ago, I took a long look at the site, what it could do and what it couldn’t. I used Google Analytics to delve into how visitors to the site used it, and what features were used most often. I was surprised to learn and the links we provide were clicked on an average of about 40 times a day, sitewide.
So I put it on my work list to improve the Admin interface so that our editors had tools to better maintain the database of links. And about 6 days ago, I dug into the problem. I was partly motivated by the discovery that there were a couple of “broken” links on the Milwaukee Road 261 page. It would have been easy enough to go into the database using a management tool and simply remove the defective entry, but that didn’t fit with my redesign philosophy. I’m trying to make the site completely maintainable by someone with now programming or database skills.
In any case, I went ahead and wrote the “Delete Link” functionality for our editors, and it worked nicely. Somewhere along the way, I began to wonder just how many broken links there are in database. I imagined that it would be an annoying experience for a site visitor to click on a link and end up going nowhere.
I wrote a tool to go through the database and attempt to read each and every link in the database, and record what happened. The program attempts to go to the website in the link and records what happens when it does. The following table shows the results: 3525 of the 4347 links in our database were definitely valid.
|200||Page Successfully Retrieved||3,525|
|0||DNS Resolver Failure||373|
|404||Page Not Found||367|
|408||Request Timeout Error||42|
|500||Internal Server Error||5|
|503||Service Unavailable (Temporary)||2|
I could probably bore you witless by explaining the various error codes, but insteal I will summarize: if the code isn’t 200, it didn’t work. I will be pruning the dead sites/links from the database today.
Hopefully this will make the site more useful and usable, and perhaps a bit less annoying.