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

> Don't even want to wait for an HTTP roundtrip for some of these, e.g. "liking" a post should fill in the heart icon or whatever instantly.

HN does this, and on slow days, about half of my upvotes don't go through.



Messaging apps often have a checkmark to indicate the message actually went to the server, and maybe another checkmark to indicate it was received on the other end. Maybe HN needs an icon indicating that your vote went through.


Make the arrows grey to indicate the click registered, make them disappear to indicate the server successfully registered the vote?


Yeah, it's easy enough that I was able to do it in the web inspector in a minute (artificial 1s network delay added): https://s11.gifyu.com/images/ScPMI.gif


You actually check your list of upvoted comments?


No, I just notice it when I come back to the thread later in the day and a bunch of comments I know I upvoted are back to normal.


yea but does hn have any client side js?


Yeah, a very small amount so that clicking the upvote button does not need to reload the whole page


Upvoting does work javascript disabled, it upvotes and reloads the page. It approximately keeps your position by jumping the message anchor.


I know it works with js disabled as well. But with js enabled they send just the upvote instead of reloading the whole page. Saving network traffic.

Unfortunately the js used is very minimal. And if the upvote fails, there is no graphical indication that it failed to upvote.


Can confirm, HN relies on client-side JS for voting and collapsing, but view/post/edit/delete don't need it.


makes sense, thanks for the clarification yall




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

Search: