Hacker News new | past | comments | ask | show | jobs | submit login

You can do this without javascript, you just create a form that sends an XHR PUT/POST request and returns back a 200 response.

You can't do much with the response without JS but a single upvote doesn't change anything on the page so there's no need for the reload.




> a single upvote doesn't change anything on the page

Not much, but it does hide the arrows and shows an undo link on the comment.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: