I see a lot of comments here about how not having js on the page is a great thing and lets get back to the old days. Lets be frank here, HN's UI is not good. At the very least it needs collapsible comments and responsiveness to mobile. The fact that HN is a success is despite its bad UI, or maybe because of the many HN readers out there that fix all the broken stuff on the page. While js on sites have surely overgrow…
The Single Piece of JavaScript on HN
171–180 of 195 posts
Re: The Single Piece of JavaScript on HN
#172Now if only I could convince my UX designer that websites without much JavaScript are cool.
A lot of those are either without javascript or with minimal, vanilla js.
Re: The Single Piece of JavaScript on HN
#173The HTTP request for voting should be a POST request, not a GET request, since it changes state. So both the JS hack involving an image and the non-JS fallback are broken. The JS function should use XHR, and I guess the non-JS fallback should be a form with an image button, not a link.
"However, this is not completely true. It means: it won't change the resource representation. It is still possible, that safe methods do change things on a server or resource, but this should not reflect in a different representation." http://restcookbook.com/HTTP%20Methods/idempotency/
Re: The Single Piece of JavaScript on HN
#174I see a lot of comments here about how not having js on the page is a great thing and lets get back to the old days. Lets be frank here, HN's UI is not good. At the very least it needs collapsible comments and responsiveness to mobile. The fact that HN is a success is despite its bad UI, or maybe because of the many HN readers out there that fix all the broken stuff on the page. While js on sites have surely overgrow…
>responsiveness to mobile. Please no. I like being able to zoom in or out, and too often "responsive" means no zoom and either huge or miniscule text.
Re: The Single Piece of JavaScript on HN
#175Earlier quoted context omitted.
>responsiveness to mobile. Please no. I like being able to zoom in or out, and too often "responsive" means no zoom and either huge or miniscule text.
Opera lets you override that!
Re: The Single Piece of JavaScript on HN
#176A few weeks ago I turned off javascript in my browser out of principle and to see if progressive enhancement was still a thing web developers cared about (hint: it's not). I was pleased that HN worked fine, and the only annoying thing was that voting caused a page reload. It's nice to see this get the attention it deserves! Developers! You probably don't need javascript to achieve 90% of your goals. It will just slow…
This is true, however javascript is a tool that can be useful if you are building something that provides an interactive experience for the user. In such a scenario, I have to write code somewhere to provide the experience. If I am writing it on the server side I run into several issues. It uses server resources. For example, let's say the user is looking at a large dataset. They want to sort/search/filter that datas…
I totally agree, if you are thinking about maintaining user state on the server, you are probably doing it wrong, as you are violating REST. That's the nice thing about using dumb clients, is it forces you to think about application state changes using hypermedia, instead complex client side logic. I think this leads to clean APIs.
Re: The Single Piece of JavaScript on HN
#177A few weeks ago I turned off javascript in my browser out of principle and to see if progressive enhancement was still a thing web developers cared about (hint: it's not). I was pleased that HN worked fine, and the only annoying thing was that voting caused a page reload. It's nice to see this get the attention it deserves! Developers! You probably don't need javascript to achieve 90% of your goals. It will just slow…
Why not a checkbox to turn off HTML? It would be just as "useful"...
I do need JS to achieve all my goals that can be achieved with JS. For those things that can be achieved without JS but often mistakenly involve it (hamburger menus, animations etc), I use plain markup and CSS3. But I'm not going to ruin the UX on mobiles, where in developing countries traffic still matters, just for some paranoid freaks' sake.
Re: The Single Piece of JavaScript on HN
#178A few weeks ago I turned off javascript in my browser out of principle and to see if progressive enhancement was still a thing web developers cared about (hint: it's not). I was pleased that HN worked fine, and the only annoying thing was that voting caused a page reload. It's nice to see this get the attention it deserves! Developers! You probably don't need javascript to achieve 90% of your goals. It will just slow…
But note what you assert yourself: reloading on every click is annoying. And not reloading, but also not providing feedback that you successfully clicked the button is also annoying. The 10% of your goals that you do not achieve without Javascript are essential to changing 'the web' from being a clunky to being a nice experience. The web without the least bit of Javascript is like a world without fire: you'll survive…
If someone decides they don't want any salt, they should still be able eat the plain old boring soup. They'll get the nutrition they need. Maybe it won't taste quite as nice, but the primary function of the soup is still there. Plus your soup is more accessible to people on low sodium diets, and takes less time to prepare!
Re: The Single Piece of JavaScript on HN
#179Earlier quoted context omitted.
"However, this is not completely true. It means: it won't change the resource representation. It is still possible, that safe methods do change things on a server or resource, but this should not reflect in a different representation." http://restcookbook.com/HTTP%20Methods/idempotency/
I don't think that's referring to a case like this. I'd also argue that voting _does_, slightly, change the representation.
Re: The Single Piece of JavaScript on HN
#180A few weeks ago I turned off javascript in my browser out of principle and to see if progressive enhancement was still a thing web developers cared about (hint: it's not). I was pleased that HN worked fine, and the only annoying thing was that voting caused a page reload. It's nice to see this get the attention it deserves! Developers! You probably don't need javascript to achieve 90% of your goals. It will just slow…
The next major update in all browsers absolutely must be this: inability to turn off JS. Because no one in a sane state would EVER do this now. Why not a checkbox to turn off HTML? It would be just as "useful"... I do need JS to achieve all my goals that can be achieved with JS. For those things that can be achieved without JS but often mistakenly involve it (hamburger menus, animations etc), I use plain markup and C…