Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why 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#...



I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: