Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

311–320 of 412 posts

Re: A day without JavaScript

#311
post #38

> For me it’s a matter of elegance and simplicity over unnecessary complexity. Simplicity is having one place where the DOM is created and managed, and optimizing for the 99% use case. Complexity is splitting up DOM rendering over two networked systems for servicing a 1% use case. Browsers are JS runtimes now. Get over it.

100% of users want websites to load faster though - that's a fairly big market share.

Obviously you can't make a web app without JS, but I still think you should minimise JS, or remove it if the site truly is static. It's just a better experience.

Re: A day without JavaScript

#312
post #55
post #38

> For me it’s a matter of elegance and simplicity over unnecessary complexity. Simplicity is having one place where the DOM is created and managed, and optimizing for the 99% use case. Complexity is splitting up DOM rendering over two networked systems for servicing a 1% use case. Browsers are JS runtimes now. Get over it.

Naw, I will keep running noscript and blocking script by default. If your site doesn't work, I don't care, I will go to a different one. I may be the minority now, and while there is some great use of js out there; most of it is bloated, slow, insecure, and often privacy destroying.

>I may be the minority now,

You will also be in the minority later

Re: A day without JavaScript

#313
post #82

Earlier quoted context omitted.

I honestly think the security/privacy arguments are the only valid argument against requiring JS as standard. The idea of browsers sending data that the user has explicitly elected to send (in addition to, if we're being pedantic, that the server put there in the first place) is very compelling in this day and age - only problem being that in order for that to have any meaningful impact on web security in the general…

What about power consumption as another valid argument? Your battery will last longer without Javascript.

It will last longer without a screen too.

Re: A day without JavaScript

#314
post #188

Earlier quoted context omitted.

Counter point: many cars aren't made to accommodate people as tall as a professional basketball player. Should I call them all bad (or at least not good) engineering?

Counter-counter-point: I am above 180cm (far from 200+ where many basketball players are) and many taxis aren't tuned for me and I bang my head on the ceiling so yes, I definitely call the manufacturers of those cars bad. Statistical averages are a back-patting technique between managers, let's face that reality, shall we? They very rarely have the customer's interests in mind.

You have to draw a line somewhere, though. Every engineering decision has a cost, whether time/money, opportunity cost, or design tradeoffs, so it's not practical to cater to every single user you have.

Re: A day without JavaScript

#315
post #298

Earlier quoted context omitted.

Well that and Flash was a massive vector of security problems. Plus it wasn't very good on mobile, even when it was supported (ie - on Android it was still bad and never got out of beta anyhow)

I thought it was fine on Android, I played many games on it that worked well even on those old underpowered phones. It was never good, but probably about 0% of flash apps were written that targeted mobile so I wouldn't have the expectation of good .

I think "fine" is being generous.

When it worked it was... not great, due to UI issues, but it at least worked.

Trouble is it seemed to not consistently work. I worked at a flash game developer at the time (Zynga) and it would not always load our games even if it had done so previously - the difference was sometimes just refreshing a page.

Re: A day without JavaScript

#316

Earlier quoted context omitted.

Yes, and Firefox is the 3rd of 4th most used browser at less than 10% (which is bad). So the subset of actual Firefox users that use NoScript is absolutely not worth supporting.

Sure, but we're not talking extreme niche here or anything. It was downloaded by over two million users.

Does NoScript have use cases other than blocking JS?

Re: A day without JavaScript

#317

Are there any JS frameworks that make it easy to build SPAs that degrade gracefully when JS isn't available? I know there's a lot of work done on making server-side rendering work with React / Vue / whatever, but I'm wondering if there's a framework available that asks for some tradeoffs in how your SPA is structured in order to maximize the amount of functionality available when scripting is off (similar to how Redu…

If you use Redux and React server side rendering, you can quite easily wrap forms/interactions on your page with a tag and a hidden input with the Redux action name, and then handle the actions/reducers on the server. I've played around with it in the past and managed to convert a SPA which was using redux-form heavily to work fully without Javascript enabled, and it was only like ~200sloc.

I wouldn't say it's "quite easily" done. The most obvious challenge is components that depend on data loaded asynchronously: If the only thing the component renders is a "loading" message while it fetches something from an API, that's all that the server is going to render as well. So you have to figure out a way to render asynchronously on the server-side, and then you also have to come up with a generic way to handle cookies, redirects, fallbacks for interactive features, etc. So it might be easy for really simple apps, but it gets incredibly involved as your app becomes more complex.

The nice thing about this, though, is that most of the work happens up front, and as long as you develop the app within the proper constraints, server-side rendering is more or less "free" after that.

Re: A day without JavaScript

#318

Earlier quoted context omitted.

Off-topic, but: > Full-page screenshots. Take a screenshot of the entire page, from the top of the viewport to the bottom. I'm surprised to see the Chrome developers not know what 'viewport' means.

Even more off topic but I'm surprised this isn't a consumer feature. There are so many sketchy chrome extensions that try and do this.

Even more off topic, but after Firefox (before Chrome) had introduced this feature in dev tools, they also recently introduced it as extension (and it might even work on Chrome)

Re: A day without JavaScript

#319

Earlier quoted context omitted.

HTML isn't just simple to the programmer, it's also simple in other ways which gives it unrivalled accessibility (to disabled folks, different browsers and devices, web crawlers). Not sure any SPA framework can compete.

Web crawlers and screen readers have supported Javascript for years. This is an outdated argument. SPAs can also support traditional URLs for bookmarking, indexing, etc.

Have you tried relying on SPA crawling in practice? As far as I know it's still messed up and hasn't changed in half a decade, but maybe I'm missing something.
Post reply on HN