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

This is usually what I do. 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.

One famous example of this going to far: Mac Mail app used to play a whoosh sound when your email is actually sent. They changed it to whoosh instantly no matter what. Given how often an email might fail to send or get delayed, this meant an actually useful indication of "great, your thing was sent, you can close your laptop now" was rendered useless.




> 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




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: