From: heikki <tro...@gm...> - 2008-10-10 10:28:36
|
Hello lists, I'd like your opinion / advice on the following : the browser history is fundamentally broken in GeoNetwork, on 2 different counts. (1) Public site In the public part of GeoNetwork, just about every request is an Ajax request. This means that they are not put in the browser's history, and therefore the browser's back (and forward) buttons are broken for these requests. Now there are some examples where it is perfectly fine to have Ajax, such as the loading of the mapviewer, displaying small parts of a page like "recent changes", "news" and "rating". But in my opinion those requests that look like page changes to the user, should not break the back button. These include "searchform to search results"; "search results to metadata view", to name but a few. In cases where the layout of GeoNetwork is very different from the standard layout, such as is being developed for the Dutch "national" georegister, this becomes even more apparent and annoying. A possible solution is a hack to the browser's history; to this end we might use a javascript thing called "Real Simple History". I once gave this a quick try but somehow it did not work immediately in IE, and since that is by far the important browser, the fix was useless. However according to the RSH docs it _should_ work in IE ; so maybe with a bit more effort we can get that to work. The other obvious solution is to replace the Ajax requests with good old synchronous HTTP requests. What do you think ? (2) Logged-in site In the logged-in part of the site there are various instances of requests that post form data; this breaks the back button in the most important browsers, as they will show a "Page Has Expired" when you try to go back after such a request. Also some of the back buttons on the pages do nothing but call the browser's history, and they are likewise broken. Example include viewing the categories or privileges from a metadata, validating metadata and more. The solution to this might be to use a pattern known as "PRG" or "Redirect After Post". In my opinion this is good practice in every case where we POST things because it not only solves the browser navigation, it also makes it very easy to prevent double submits. However it may be quite a lot of work. Does anyone know of, or has already made, a solution like this using our Jeeves framework ? thank you in advance for your replies Heikki Doeleman |