Hacker News new | ask | show | jobs
by dispense 4356 days ago
I can't read this article without allowing Javascript.
1 comments

That is true for about 50% of the links posted here these days. I usually just close the tab and read the comments on HN.

Note to site designers: something is terribly wrong if JS is needed to render the main textual content of your site.

Or just get with the program and allow JS. It's not going away, as flawed a language as it is.

Web browsers are an execution environment, no longer just document viewers.

> Web browsers are an execution environment, no longer just document viewers.

Indeed they are. But there is a real duality here. On HN, I see links to both applications and documents. Both of them happen to be HTTP links, since the web supports both.

I am mostly interested in the documents.

If you have a document to present, perhaps you should present it as a document, instead of requiring users to run your application to present your document?

If you want a responsive document that scales to all different screen sizes, modern touch-sensitive navigation for the content of this document, view-able on all the cornucopia of mobile and desktop browsers today then you need to use JS. Yes, maybe one in ten thousand web devs are the CSS master-wizards who can find a declarative way to do everything everywhere on any browser but it usually takes 10x the effort. Simpler to just use tested JS libraries
This seems pretty responsive to me:

http://motherfuckingwebsite.com/

>This site doesn't care if you're on an iMac or a motherfucking Tamagotchi.

That link is the best thing that's ever happened to the internet.
Why should the static content be dynamic? The responsive look can be a cherry on top of the static content.

    $("#content").makeResponsive();
No one but a tiny minority is even aware of the duality.

It's nice to be able to rely on JS being there, just like it's nice to rely on having the correct DOM constructed since HTML parsing has been standardised. There are things that are much easier to do this way.

It's not because I dislike JS the language that I disable it.

And, I do enable JS when I am on a familiar / trusted / interesting site. I definitely won't enable it on an unfamiliar / blank looking website.

But why should viewing a document require javascript execution?
Because CSS and HTML are woefully inadequate and JavaScript has to be used to produce many layouts.
What about Braille readers and stuff like that? How well do they support javascript?
Reportedly, accessible browsers do support JavaScript well enough. Modern ones are usually based on WebKit. They have to contend with the real world of websites (already) using JS to display content.