Re: Redirect after post for happy bookmarking and refreshing
by Joost (Canon) on May 26, 2005 at 13:12 UTC
|
I know it's not the same, but I usually click on the node id to reload the page, (it's right under the node title: on May 26, 2005 at 14:55 GMT-2 ( #460654=monkdiscuss: print w/ replies, xml ) in case of your node.
update: I do like this fix, though.
| [reply] [d/l] |
|
|
True, there are ways around it. It isn't a major problem, although perhaps I didn't convey that in my post. It is an annoyance that you have to take that extra step though, and it should be a pretty easy thing to fix (as my code demonstrates) and make PM that little bit nicer.
| [reply] |
Re: Redirect after post for happy bookmarking and refreshing (easy)
by tye (Sage) on May 26, 2005 at 16:49 UTC
|
Yep, pretty trivial stuff. Oh, except for that one part:
#
# Insert code to record votes here
#
Yeah, just that little bit of code that pretty much runs the whole site, the whole framework that just doesn't cut'n'paste into such a block very nicely. :)
The only "pretty easy" routes would be to either: A) render the whole page as usual and then, at or near the "last minute", throw all of that work away and instead output a redirect which would then have to render everything all over again; B) do something like you've written but try to yank aside the bits of processing that are required by the vote-casting code (parsing the cookie, loading your user information, the node cache, etc.). Note that (A) also presents a specific problem of rendering the XP Nodelet but then not displaying it; which means someone might miss an announcement of having gained new level powers (not a horrid problem, but something worth avoiding).
Actually, you are only talking about "vote", not any of the other POST situations at PerlMonks. Voting is handled by an opcode, which gets run fairly early in the whole request processing line, so we could switch to a redirect right after that if voting was POSTed. However, I believe we have forms that mix voting with node updates so we'd have to look into whether those would be messed up by such a change.
I'd rather do something like this for all POST operations -- why "fix" voting but not chatter, node creation, node updates, consideration, etc. But, despite assumptions about how easy something like this must surely be, I'm not convinced that it actually is easy. Certainly, it isn't trivial for me to even work out an easy way to implement it that I'm sure will work without some unfortunately consequences.
I encourage the appointed to look into such a scheme. I've outlined some possible approaches and some potential problems, so there might be a useful starting point there.
| [reply] [d/l] |
|
|
Yeah, just that little bit of code that pretty much runs the whole site, the whole framework that just doesn't cut'n'paste into such a block very nicely.
I knew there was a I reason I added the depending on how the modified Everything code that PM runs on is set out qualifier ;)
Actually, you are only talking about "vote", not any of the other POST situations at PerlMonks.
Simply the usecase I'd encountered, its useful as a general pattern for many post operations. Hmm, pattern, I wonder what google has to say about it.
| [reply] |
Re: Redirect after post for happy bookmarking and refreshing
by davidrw (Prior) on May 26, 2005 at 13:38 UTC
|
I also encounter this when moderating a node, too -- either aproving or voting on a consideration (granted these cases happen a lot less often then the voting case).
Anyways, I do the same thing as Joost and just click on the node id in the title.. An alternative would be to put something like [id://`id`|THIS NODE] in your Free Nodelet Settings.
| [reply] [d/l] |
Re: Redirect after post for happy bookmarking and refreshing
by halley (Prior) on May 26, 2005 at 13:39 UTC
|
Personally, I'd like to see the voting system go the way of AJAX, with instantaneous submission without leaving the current page at all. NetFlix's voting (1 to 5 "stars") is perfect: you can click any star anywhere and it won't lose your place as you browse.
-- [ e d @ h a l l e y . c c ]
| [reply] |
|
|
I'd like to see the voting system go the way of AJAX
I like that idea, but there would still have to be some way to confirm your vote, otherwise I could see accidentally voting the wrong way. It might be a hard sell on the devs, though. I have heard from a few that they try to maintain browser compatibility at nearly all costs. I don't really know how I feel about this policy, but that's what it seems to be.
| [reply] |
|
|
I disagree that there should be a confirmation. I personally think that WAY too many user interfaces treat users like idiots and require confirmation on the most trivial of tasks.
Sure, confirm before something VALUABLE is irrevokable, but a vote on a single writeup on PerlMonks? Cripes. You get several per day, and if you think you clicked the wrong button, make it up to the author on their next writeup. You don't need to confirm every little worthless thing, even if it's a permanent worthless thing.
-- [ e d @ h a l l e y . c c ]
| [reply] |
|
|
Re: Redirect after post for happy bookmarking and refreshing
by belg4mit (Prior) on Jun 12, 2005 at 10:35 UTC
|
Yeah it kinda sucks, but try training yourself to bookmark then post? Use back button? Or an alternative half-fix might be to append node_id to the form action URI?
UPDATE: Test action with appended node_id, well it worked
but there's a pparently already a redirect somewhere since you still end up at index.pl.
| [reply] |