Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

61–70 of 412 posts

Re: A day without JavaScript

#61

Looking forward to the author's follow up: "A day without a CPU". I am sick of lazy, profligate coders assuming that my computer is a von Neumann machine. And that just because I run their software, I am happy with it spending billions of my CPU cycles. How did we, as an industry, get to this point!?

What a dumb comment. "A day without JavaScript" is to websites as "A day without a CPU" is to paper books. Documents are not software.

Re: A day without JavaScript

#62

Having browsed nearly JS-free for the last two-ish years, aside from a bit of tweaking at the start, I have to say that it has made things a lot faster, more stable, and just much more of a pleasure to navigate. If anyone is interested, I have found that two tools make life a lot easier: - NoScript, which blocks execution of scripts save for those you whitelist. This means sites that reasonably require JS (e.g. YouTu…

Would you mind sharing that bookmarklet?

Re: A day without JavaScript

#63

Earlier quoted context omitted.

Re [0], note that Google Maps on the other hand seems to handle lack of JS very well. I guess it can be blamed on different teams in the same big company.

If by "seems to handle lack of JS very well" you mean "does not work at all", that makes sense. Not being sarcastic either, it seems they decided to take an all or nothing approach and force the user to enable JS to use Google Maps, or instead see this page: https://i.imgur.com/Qc156Ds.png Maybe the maps product wholly depends on JS for all functionality?

Yeah, my point is that they put actual effort to show you a nice-looking page when viewing Maps without JS enabled. Compare to the Chrome download page, which blanks out. This is orthogonal to whether or not a service can/should work without JS enabled.

Re: A day without JavaScript

#64

People should realise that most sites today aren't websites, they're web applications. HTML is just the template/output language. Without JS you would have to download an even crappier, probably Windows only desktop app since it wouldn't be possible to implement the logic.

No, most websites are still websites, and one of the biggest problem on the web is the plague of people who think their website should be an application instead. Actual web applications, like e.g. office suites, map applications, ect. are obviously extempt from "should work fine without JS" rule.

Are you really trying to say there's no argument to be made that SPA + prerendering is a design pattern with advantages over flat html, even for static content?

Obviously there are disadvantages as well, but it's a tradeoff, and if executed correctly it's one that, as fewer people turn off JS and browsers become better at running web apps, is increasingly becoming worth the complexity for certain use cases.

Re: A day without JavaScript

#65
post #11

Earlier quoted context omitted.

Not really an answer to your question, but this might be useful: http://youmightnotneedjquery.com

Yeah. Except you need to do Ajax and fetch doesn't cut it. So new lib. And manipulate the dom with something better then the browser API or you loose your mind. So new lib. Then normalize browser events. Oh wait, you can do that manually. But you are writing a new lib. Eventually the code will grow to be the size of jQuery anyway. Only not as well tested, documented and cached.

> Yeah. Except you need to do Ajax and fetch doesn't cut it. So new lib.

Ah, so this is how front-end got the way it is.

Re: A day without JavaScript

#66
post #51
post #20

It's 2017. All modern browsers support JS and it's no longer reasonable to expect all websites to work very well without it.

All modern browsers support JS While that's true it's not reasonable to assume the user has JS enabled. Ad-blocking plugins that also block JS are increasingly common. and it's no longer reasonable to expect all websites to work very well without it. The question should be "what does work very well" actually mean? For a closed application that requires the user to log in I don't really care. Users won't use the app i…

> That's where work needs to be done.

Why?

Instead of building for 0.5% of users that can just enable JavaScript, why shouldn't I invest the time into building a new feature, writing more unit tests, or writing an app for Windows Phone?

Re: A day without JavaScript

#67
post #29

One thing to consider is that at larger companies, we already have a difficult enough time testing all of our site with JavaScript enabled. Netflix building a version that works without JavaScript is like asking them to build a second website, especially from a QA perspective. When you look at your users and find that .5% of them are not running JavaScript, how do you justify spending the money for that few of people…

Try doing some automated testing, it'll take care of most of the non-JS testing and a lot of the JS enabled testing as well. Explority testing is another thing, that QA really does need to be involved with, but if you can't test static content without human intervention, you have other problems that are nothing to do with whether you have JS turned on or off.

Re: A day without JavaScript

#68
post #59
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.

> Browsers are JS runtimes now. Get over it. Sure, dude, ignore anyone without a machine that can run MBs of JS within a reasonable time.

This is a question about JS vs no JS, not about optimizations of JS.

Re: A day without JavaScript

#69
post #62

Having browsed nearly JS-free for the last two-ish years, aside from a bit of tweaking at the start, I have to say that it has made things a lot faster, more stable, and just much more of a pleasure to navigate. If anyone is interested, I have found that two tools make life a lot easier: - NoScript, which blocks execution of scripts save for those you whitelist. This means sites that reasonably require JS (e.g. YouTu…

Would you mind sharing that bookmarklet?

Sure:

    javascript:(function()%7Bvar%20loc%3Dwindow.location%3Bif%20(window.location.protocol%20!%3D%20%22https%3A%22)%7Bloc%3Dwindow.location.toString().replace(%2F%5Ehttp%3A%5C%2F%5C%2F%2F%2C'http%3A%2F%2Fwebcache.googleusercontent.com%2Fsearch%3Fq%3Dcache%3A')%3B%7Delse%7Bloc%3Dwindow.location.toString().replace(%2F%5Ehttps%3A%5C%2F%5C%2F%2F%2C'https%3A%2F%2Fwebcache.googleusercontent.com%2Fsearch%3Fq%3Dcache%3A')%3B%7Dwindow.location.replace(loc%20%2B%20'%26num%3D1%26strip%3D1%26vwsrc%3D0')%7D)()
Glancing at it, it just seems to drop the webcache URL in front of the current page location. Credit to http://www.localseoguide.com/easily-check-the-text-only-cach..., if I recall correctly.

Re: A day without JavaScript

#70

Earlier quoted context omitted.

Yeah. Except you need to do Ajax and fetch doesn't cut it. So new lib. And manipulate the dom with something better then the browser API or you loose your mind. So new lib. Then normalize browser events. Oh wait, you can do that manually. But you are writing a new lib. Eventually the code will grow to be the size of jQuery anyway. Only not as well tested, documented and cached.

Also, vast majority of users will have a cached copy of jQuery from Google CDN already. Now bundling it with the rest of your JS, that's indeed a mistake.

CDNs are a lie. The privacy implications outweigh the performance benefits since there are many, many, many CDNs and many, many versions of jQuery. It's rare for users to benefit from caching.
Post reply on HN