Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

JavaScript makes the upvote/downvote buttons work in a way that users expect them to work. Given that is almost 50% of the end-user functionality of this site, I'd say that's pretty important.


sort by: page size:

The upvote and downvotes buttons are intended to serve this function.

The vote/downvote buttons do not require JS. You can verify this in the same, under the network tab. There is disallowed JS request, but the vote succeeds independent of the JS not being allowed.

This is probably the reason upvotes still work with javascript dissabled. It’s a feature.

Even without JS, there are tricks to make the upvote button work without refreshing the page. HN used to do this, not sure if it still does.

Thank you, very good answer! It makes a bit more sense to me. Also tested in Chrome w/o Javascript, and it does indeed work. Upvoting's just a little more inconvenient.

If I could upvote this, I would. No Javascript means I cannot upvote.

? HN is oldfashioned enough that JS on vote buttons is progressive enhancement, not required.


Ah, interesting observation. The difference is actually that the up arrows don't have an onclick attribute if you're not logged in, so you end up with the vote behaviour you normally get if you have JavaScript disabled.

I agree with you, but just a point: the upvote and downvote arrows actually go to other pages when you disable JS, so it makes sense for them to be <a> tags. They should provide better feedback though (and a title attribute for screen readers).

The [-] is more complicated. Ideally it would link to a non-js fallback, but alas. But it's much better as an anchor tag than as a button disguised as a link.


Oddly enough no, I can read the vote up buttons just fine and should in fact use them more :) maybe some JS behind the scenes that is taking care of it

Javascript bad, HTML good. Upvotes to the left.

Upvote/downvote buttons!

> I am using a text-based browser and so I do not use the upvote/downvote javascript. Consider this comment an upvote.

I haven't tried, but looking at this page source it looks to me that vote arrows are divs wrapped in anchors pointing to up- and down vote URLs. They should definitely be usable without JS; maybe the problem is that the empty divs are not visible in your text browser?


There are upvote/downvote buttons -- I'm unsure why any other criteria is needed.

I used to do this many years ago. Then I added JS to upvote and downvote on HN and reddit. Then I gave up. Now I just use umatrix on Chrome or FF

I always thought the only way downvotes buttons should be implemented is that they're non-functional, in that they do nothing other than let a user take an action; you could perhaps then influence what that specific user sees in the future, to help get an idea of their tastes, or instead not actually affecting where a comment or post shows up in an order.

I know the upvote button is small. I'm a noob so I don't have a downvote button so I can only guess they put it right next to the upvote one.

> it's just a sampling from the subset of HN users that can figure out what the buttons do

Or those who don't experience layout problems. Often there is a significant part of the down arrow that results in an upvote or vice versa. Generally happens in FF for me. I feel like I need to check the URL before clicking.


For better or worse, the up/downvote buttons are used to express an opinion -- that is the primary purpose.

The problem is that any crowdsourced curation feature uses significant downvotes as a signal for spam or content which otherwise violates the site policies.


What downvote button?
next

Legal | privacy