Maritime Law Book has been re-designing its website. As of the date of writing, I hadn’t seen an announcement. It was just something I happened to notice on May 3, 2011.
The change I’m going to talk about isn’t the most obvious one to a casual observer, but it is a very welcome one. The change I particularly want to notice is that people can now create links like this one to cases reported by Maritime Law Book:
The best way to cite a case is to provide a hyperlink. Because of that, the people who report cases on the web should make it as easy as possible for writers to provide links to their publications. So congratulations to Maritime Law Book! One thing hasn’t changed: the reader still has the choice between the “raw law” and the pay-per-view headnoted version.
It was possible to create hyperlinks to Maritime Law Book cases before this change, but it was way too complicated. Naturally, now that the good times have arrived, I’m going to tell you about the bad old days. I used to walk a mile through snow drifts to get to school too.
The big change from the old to the new–and I think this is a recent change–is from the POST method to the GET method. The object of both methods is to submit user data from the browser to the web site. In each case, the parameters and values making up the query are part of a message sent to a database on the web site. The POST method sends this data in the body of the message. The GET method only uses a message header. As far as I know, in the history of HTTP, both methods are equally old. For additional reading, see section 9 of RFC2616.
The truth is, I’m not absolutely sure that I couldn’t have used the GET method with Maritime Law Book at some earlier date. I have a vague recollection of having tried at various times. Unfortunately, I didn’t document those attempts. What I do know for sure is that the form tag method attributes on Maritime Law Book’s web pages recently changed from POST to GET.
Maritime Law Book’s new page is:
The old ones (still around at the date of writing) were:
http://www.mlb.nb.ca/cf-docs/FreeSearch.cfm (the starting point)
http://www.mlb.nb.ca/cf-docs/FreeSelectDB.cfm (the halfway point)
Note: Going to this page first produces an error message.
In the new world, the ACTION on
In the old world, the ACTION on
from which, in turn, the ACTION was to
To the same destination, by a longer route.
Where the GET method of submitting data is available, there’s no need for a form: it can be just as simple as adding appropriate parameters and values to the URI. In the example at the top, it’s just:
1. Load a new page of our own containing a suitable HTML form and input tags.
2. Have the form submitted automatically by the browser as soon as the page has completely loaded.
It is a tenet of my religion that pop-ups are evil. Just to be ecumenical for a moment, however, I’ll add that the pop-up way of doing step one would be to create a link like this:
<a href=”#” onClick=”mlb_create()”>
My preferred solution was to create a separate web page that could be loaded from the first. One advantage of this approach was that, whereas a page created on the fly always went into a pop-up window, a reader could use the browser to choose to load the pre-existing page into the existing tab, into a new tab, or into a new window. Much better.
The second advantage was that most of my pre-existing page was re-usable. All I needed to do was to pass the varying portions of my query over from my first page to my second page. I did this by using the query portion of the URI of my second page. When that link was clicked, the necessary information from the first page (for example, “271%20O.A.C.%20135%20\\%20MLB”) was sent to the second. The DOM window.location.search property was used by the second page to receive it.
I’ll admit to having gotten a certain satisfaction out of doing things the hard way. Congratulations, though, to Maritime Law Book on making its site so much easier to use.