Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.

In reply to [Free Nodelet Hack Feature Request] "POST 2 GET" by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-24 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found