3 ms·
> For example, in a scriptless world, your HN up/down vote can't be done without a full page load, which would come with the added headache of changing the stat
by tzs 9y ago
> For example, in a scriptless world, your HN up/down vote can't be done without a full page load, which would come with the added headache of changing the state of the world on your page because stories and comments have changed their ordering. Solution? Return of the chronological thread (no thanks).
I don't see why it would have to change the state of the world on your page. Sites like HN in a scriptless client world would still be programmatically generated on the server, and presumably could still keep track of state via cookies or via adding parameters to links when they generate the page.
Up/down vote could reload the same view you had before voting, with only the effects of your vote added.
- rev_bird 9y agoThat's true, but it would still need to reload, rather than just sending the little request in the background as you keep scrolling along.
- mrec 9y agoWhy does it need to reload? Why not just have the votey button hyperlink to a dummy fragment URI like "#upvote_comment_1234", and something like a ping attribute [1] to send a request in the background, and a CSS rule like a.votey:visited { visibility:hidden; } to hide the button once you've clicked it? [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-ping https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#...
- rev_bird 9y agoI honestly didn't know about "PING," thank you. I have no idea how I missed such a fundamental feature, even if it is relatively new.