Hacker News new | ask | show | jobs
by zeveb 3662 days ago
This, so much this.

There's no reason why this page couldn't work without JavaScript. It's a poll and a display of the results.

Sure, enhance it with JavaScript: that's great, and it's cool, and it's useful. But don't force people to execute code when all they really need to do is POST a form and then GET a page.

People who do this are wrong.

2 comments

> There's no reason why this page couldn't work without JavaScript.

Your position is ridiculous. HTML5 was designed in part to make it easier to create applications that run in your browser. So yes some people will be writing applications that run in your browser. It's like expecting flash sites to work when you don't have flash turned on. Either be happy with your choice or turn it back on. Don't expect the rest of the world to cater to your fringe browser settings.

But this isn't an app. It's a poll and some poll results. We were doing this on the web for decades without invoking JS.
Everything is an app. There are apps that show a GIF and all they do is that on many app-stores, with lot's of downloads because the GIF happens to be that of a woman's bum.
Okay, let's just make this a formal distinction then.

Web pages should use JS only when necessary to enhance the user experience.

Web applications can go hog wild and load 10MB of JS libs.

But what incentives will exactly cause developers to continue to develop web pages wherever possible instead of bundling everything into apps? Website owners also like the power that they can get from executing full-blown programs on each client's machine, rather than serving dumb unidirectional data. The Internet has evolved in many ways just like the outside world has evolved, IMO. The "correct" or the "elegant" is rarely what actually seems to happen. Instead it's a wild struggle for survival in which boundaries are pushed and abused, which leads to wonderful innovations, but the downside is there's nothing "ethical" about it.
Sadly, you're right.

The problem is that hosts have too much control over client's experience. Frankly, most of the works designers today do on the web is work that should not be done - 90% of websites would be infinitely better if they only sent text with lightweight semantic annotations and a list of available actions. The user should be able to explore the data in whatever way they please, and not be shoehorned into a single prescribed way of interaction.

That said, your point on incentives is spot-on. People making money on the web benefit from any marginal increase of control they can get - so the whole thing turns into a typical race to the bottom. And then, they also can (and do) use their money to influence the development of web technologies to make it easier for them to make more money. This process sadly isn't any different than regulations being influenced by businesses to benefit them instead of society.

Is there a solution? I don't know. Most people don't even realize how much of their own time and potential they waste by accepting the "status quo". I hope someone eventually develops a browser with sole purpose of unfucking the Internet. Some kind of a cross between links, Emacs and the Reader Mode from Firefox.

I can understand requiring JavaScript if it's a game or some sort of multimedia experience, but something like this really doesn't need JavaScript.

Search engines typically don't run JavaScript, so relying on it can be bad for SEO, and in some cases accessibility.

Considering iOS devices don't support Flash, and popularity for Flash is waning, I think it's even worse to suggest a website should cater only to those who can run Flash.

> Your position is ridiculous... It's like expecting flash sites to work when you don't have flash turned on.

Not really. Nobody is expecting JS code to work without a JS interpreter being available/enabled. Instead, they're expecting a page of text + images to work without any JS code being required.

In your analogy, nobody expects Flash objects to work without Flash. Everybody expects text + images to work without Flash objects being required.

Yes, and it's been thoroughly abused by lazy/incompetent developers. That's why we end up with 3 MB pages running React or whatever shiny new web framework Facebook/Google has released to display three paragraphs of text.
Here you go. I added one, but unfortunately, it returns a bad request code.

<html> <body> <form method="post" action="https://webwewant.mozilla.org/share/"> <ul> <li><label><input name="issue" value="access" type="radio"/> Is available to all</label></li> <li><label><input name="issue" value="freedom" type="radio"/> Promotes freedom</label></li> <li><label><input name="issue" value="control" type="radio"/> Puts me in control</li> <li><label><input name="issue" value="opportunity" type="radio"/> Creates opportunity</label></li> <li><label><input name="issue" value="learning" type="radio"/> Inspires learning</label></li> <li><label><input name="issue" value="privacy" type="radio"/> Safeguards privacy</label></li> <li><label><input name="issue" value="nojs" type="radio"/> Works without javascript</label></li> </ul> <input type="submit" value="Submit"/> </form> </body> </html>