Hacker News new | ask | show | jobs
by pessimizer 3662 days ago
I don't like it being required in order to browse effectively static pages on the web. The rest is fine.
1 comments

What's the difference between having a web server look up an article in a DB and serve it to you, and having a web page's JS look up that article in a DB and pull it to your browser? It seems like that would be the least offensive use of JS.
For one, you have to execute javascript. For the other, you don't. If you want to do it on the server side, feel free.
But you said you'd be "fine" executing JS for other kinds of pages. What is it about "effectively static" pages that offends you?
Nothing about static pages offends me.
You can absolutely use JavaScript to pull an article into the browser.

But if the user doesn't have JavaScript, they should still be able to navigate the site the old-fashioned way. It doesn't have to be one way or the other.

I think the vast majority of people browsing without JS are people who have manually disabled it. Which goes back to my first question: Can we make a JS that's acceptable to those people, so they will just enable it?
I regularly browse the web using Lynx, a text-only browser that doesn't even have a setting to enable JavaScript.

There should almost always be fallbacks for people who don't have JavaScript, but if you are going to use JavaScript, it would at least help if any nontrivial code were free, such that it isn't blocked by the LibreJS add-on.

At the very least, the user experience with JavaScript enabled should not be worse than with JavaScript disabled.

It's not the problem of JS, it's what is being done with it. It's about bullshit and bloat, about lazy-ass developers, designers showing off and the web being fashion-driven industry. It's about ads and tracking.

The only way to fix it JS-level is to bake a requirement into the standard that the code size limit for JS is 256kb. If a company can't fit their "value-added features" in it, that's their problem.

I don't know if there are stats about disabling JS in the preferences of the browser, but I'm using NoScript. That's a finer grained control. Absolutely no JS would mean almost no web nowadays. Maybe wikipedia works.
People using Opera Mini are effectively browsing without JS, I'm sure they outnumber the people turning off JS or using NoScript in other browsers.
Compromise and make sure it's served 1st party?
Caches are nice though. Compromise and make sure it's checked against a hash provided by the first party?
As long as you use subresource integrity we have a deal! I know it's currently experimental but having native browser support is much more palatable than using JS to check the hash.
Then ensure that it can't communicate with the domain it's loaded from.