http://www.perlmonks.org?node_id=725803

I personally believe I've discussed this before, but I can't find any reference ATM, however I'm sure that there were some knowledgeable monks agreeing with me: it was not in the context of the Free Nodelet, though, but as a general consideration about this site.

The problem: I browse PM from http://perlmonks.org/ thus this very node for me is identified by the URL http://perlmonks.org/?node_id=725803. Now, if I do any operation (bringing back to the very same page) requiring a POST, up to a seemingly harmless /msg, then the "new" URL of the page will be http://perlmonks.org/?. Granted, generally this is not a problem since you either close the page itself, or follow links, and so on. But I often leave a tab open to "check it later..." And guess what? Crashes happen! Rarely enough, fortunately, but they do. FF does a good job of recovering after them, but on those tabs I'm basically redirected to the Monastery Gates. Or... it's even happened to me to bookmark some of them - and then I was bookmarking the Monastery Gates again, rather than what I really wanted.

Thus I'm shamelessly asking the JS-gurus hanging around here if they could concoct up a tiny script that would check the URL for the current page and if it does not have either a node parameter or a node_id one, then find the latter (I seem to have understood that pages are regular enough to allow one to do so reliably) and reload the page redirecting there.

I am aware that this would impose some overhead on the server; what's worst, in fact, is that the whole page up to the Free Nodlet must be loaded for the script contained in it to take effect. (In which case, as a tiny optimization, one would probably include it there as the first one.) Thus, as an alternative one may consider using Greasemonkey instead: I believe (rightly so?!?) that the script itself may stay pretty much the same with the difference that it could take effect as early as possible (rightly so, too?!?) and I didn't mention it in the first place because

  • every time I did so, someone mentioned that "now there's the Free Nodelet;"
  • it is much easier than one would want to enable the FN and JS code there than installing GM.

Update: [Tue Nov 25 11:37:33 2008] I only did a pair of tests with ccn's code but indeed they worked like a charm: thank you very much, fellow monk!

--
If you can't understand the incipit, then please check the IPB Campaign.