Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

feauture request: remove page where I voted from browser history

by Discipulus (Canon)
on Jul 11, 2024 at 08:57 UTC ( [id://11160538]=monkdiscuss: print w/replies, xml ) Need Help??

Hello pmdev and all,

just a small change, but maybe hard to implement, of a behaviour I find a bit annoying.

  • actual behaviour If I go from page A to page B and then I vote for some node the page refresh afeter hitting the stumbit buttom. So if I use the Back button of the browser I find myself still in page B

  • desired behaviour I vote for some node in page B and if I go back in history with the browser I land in A
We discused a bit in the chat this morning and I realized that here (thankfully and hopefully) JS is almost restricted for security reasons. But anyway there are two possible approaches:
  • make the vote something inline within the page as suggested by an uberwise monk, so that clicking the voting button does not reload the page via a submit button but records the vote

  • use the OnSubmit (or whatever is called) to remove the page from browser history
Do you thing it is something worth to implement?

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re: feauture request: remove page where I voted from browser history (AJAX vote)
by LanX (Saint) on Jul 11, 2024 at 10:22 UTC
Re: feauture request: remove page where I voted from browser history
by choroba (Cardinal) on Jul 11, 2024 at 09:20 UTC
Re: feauture request: remove page where I voted from browser history
by hippo (Archbishop) on Jul 11, 2024 at 10:47 UTC
    Do you thing it is something worth to implement?

    Not globally. The current behaviour is the one I expect, even if it is unintuitive for you.

    I would also tend to argue mildly against 1-click voting: it becomes too easy to click by mistake (or indeed too soon where reading a reply afterwards might cause you to re-evaluate your vote) and if a monk wants to vote on a lot of nodes on one page then that results in more round-tripping to the servers than just submitting the whole form once as is now the case.


    🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-09-18 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (25 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.