Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

POST and automatic redirecting?

by blazar (Canon)
on Mar 13, 2007 at 16:13 UTC ( [id://604596]=monkdiscuss: print w/replies, xml ) Need Help??

The problem: sometimes I bookmark PM pages with my browser and/or with some system of social bookmarking. The problem is I often do so after having voted. Thus there's been a POST and the page url reads http://perlmonks.org/?. (Well, because I browse PM from perlmonks.org, but it would be the same from the alternate hosts.) Since I'm absent minded I often forget about this, and I get "broken" bookmarks, which is annoying. So I know that this would impose some extra load on the servers, but I wonder whether a voting POST could be followed by an automatic redirect. (I don't think other POSTs would constitute a problem in this sense.)

Replies are listed 'Best First'.
Re: POST and automatic redirecting? (create)
by tye (Sage) on Mar 13, 2007 at 17:18 UTC

    I think this is even more important for POSTs that create a node.

    - tye        

Re: POST and automatic redirecting?
by ikegami (Patriarch) on Mar 13, 2007 at 17:26 UTC
    It would also be useful after marking a node for Consideration, since the page on which it currently ends doesn't allow voting on the Consideration.

      FYI, that is simply a bug in the nodelet's code. One for which the code to fix it was written years ago. One day those fixes might even get applied.

      - tye        

Re: POST and automatic redirecting?
by Mutant (Priest) on Mar 14, 2007 at 11:24 UTC
    I've always thought voting would be the ideal candidate for AJAX (not every use of AJAX is Evil, believe it or not). From a purely UI point of view, it's a pain to have to scroll to the bottom of the page to click the 'Vote' button, especially if there are a lot of replies.

    But even without that, it's becoming a standard to redirect after a POST, rather than having the POST action display content.

      I've always thought voting would be the ideal candidate for AJAX

      Actually, I disagree. Sometimes I find myself clicking the up- (or down-) vote buttons, but then (before reaching the "vote" button) change my mind and either completely reverse my vote, or remove my vote from a given node (+=0). If clicking a vote button auto-fired an AJAX request, I'd have no chance for take-backs.

      Could it be a user training issue? Maybe. But I don't think I'll change my behavior.



      --chargrill
      s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
        Actually, I disagree. Sometimes I find myself clicking the up- (or down-) vote buttons, but then (before reaching the "vote" button) change my mind and either completely reverse my vote, or remove my vote from a given node (+=0). If clicking a vote button auto-fired an AJAX request, I'd have no chance for take-backs.

        Well, I guess that if hypothetically AJAX voting were implemented, it would be a personal choice, whether to activate it or not, just with quite about so many PM features.

        There are a few options to solve that, one of the simplist of which is to have a button next to each set of radio buttons to actually submit the vote. (The button could be optional).
      it's a pain to have to scroll to the bottom of the page to click the 'Vote' button, especially if there are a lot of replies
      You can use CSS to float the vote button so there's no need to scroll. See Re: The big Vote button.

      From a purely UI point of view, it's a pain to have to scroll to the bottom of the page to click the 'Vote' button, especially if there are a lot of replies.

      So... don't. The voting buttons are one large form on each page. In Firefox, at least, clicking a voting radio button and pressing Enter submits the form. Even without that, though, I've never found pressing Ctrl-End in order to get to the bottom of the current page to be "a pain".

      <radiant.matrix>
      Ramblings and references
      The Code that can be seen is not the true Code
      I haven't found a problem yet that can't be solved by a well-placed trebuchet
        From a purely UI point of view, it's a pain to have to scroll to the bottom of the page to click the 'Vote' button, especially if there are a lot of replies.

      Then you may not be aware that pressing Enter does the same thing as clicking on the Vote button. I do that all the time .. the alternative would be End, followed by a mouse click. Still not that bad.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

        I am aware about using 'Enter', but then I have to wait for the page to reload. And depending on your browser (and potentially some other things), the page may not be reloaded at exactly the same place you were before you pressed 'Enter', so you lose your place (can be a problem if the thread is really long). Same problem if you go to the end of the page and click the button.

        Minor annoyances, yes, but I think there's a fairly simple solution.

        UI can often be a matter of opinion or personal taste, but surely it makes sense to allow a user to make a decision on voting for a particular reply while they're viewing it, and not have to scroll to find where they were?

        (Actually, the scrolling issue could be fixed if the page redirected correctly, and anchors were used, but I'd still like to at least see a button next to the voting radio buttons).
      not every use of AJAX is Evil, believe it or not

      I never thought so. The issue has been discussed before. And the general consensus is that there are good reasons not to do so. You may want to use Super Search to find relevant threads. OTOH bsdz posted a solution that may be enough for you.

        Perhaps AJAX is not the answer then, but there are some other options (some of which I mentioned in my post below). I guess this is not really a priority for the dev team, and I'm not trying to demand that they fix it. It's just one of those things I look at whenever I visit the site and think "there must be a better way" :)
Re: POST and automatic redirecting?
by qbxk (Friar) on Mar 18, 2007 at 20:07 UTC
    in addition to the OP's suggestion, which I heartily endorse, the redirect could come back with an anchor link too, so we wouldn't have to scroll back to the node we were showing on the reload, thus solving an additional infatuating furiation on PM

    It's not what you look like, when you're doin' what you’re doin'.
    It's what you’re doin' when you’re doin' what you look like you’re doin'!
         - Charles Wright & the Watts 103rd Street Rhythm Band, Express yourself

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://604596]
Approved by ChemBoy
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found