Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

31–40 of 412 posts

Re: A day without JavaScript

#31
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. YouTube, Google Maps) can remain functional.

- A bookmarklet that redirects you to the Google text-only cache of the current page, which is great for text-based articles that inexplicably require JS to show content.

Re: A day without JavaScript

#32
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.

Why doesn't fetch and its polyfill cut it?

Re: A day without JavaScript

#33

I generally agree with what he is saying, but the web has moved beyond the point where its reasonable to expect websites to have JS fallbacks. It is just too prominent now a days. I've always been a JS hater, though I have to code it frequently.. However, with that said I find the arguments against the language becoming more and more obsolete as the years go on.

It's not unreasonable to expect hyperlinks or images to work without JS. Fancier stuff sure, but basic navigation through a content only site should be functional without it. This is what HTML does and you have to be profoundly lazy to screw that up.

This is really the problem I think. It's not as much fun to create something that functions properly.

The best FE devs make sure that they create functioning web pages first. Then they go ahead and make them better with some JS. Only the least competent/laziest developers create JS only sites (this is discounting things like JS games etc where there's no text or images, or pretty much anything that can be done in HTML).

I find it frustrating when these devs try to paint the web as something more advanced, or somehow different (seriously, it's not a special snowflake) in order to try to validate their preferred way of working. It's unprofessional to their employers, it's a disservice to themselves and it's a big "screw you!" to their users.

Re: A day without JavaScript

#34
post #23

I turned off JavaScript and Cookies for all sites a few months ago and only whitelist (or open in another Chrome profile) when they refuse to display or need an authenticated session. There are some sites that require JS to render, but the great thing is that majority of pages I visit work just fine as plain html/css. In general I feel less distraction from popups, overlays, ads, etc.

I use uMatrix as a substitute for NoScript + uBlock, and while it's a pain to get some sites working manually without bulk-enabling everything on them, I'm mostly happy about it, and the web looks better for me.

Re: A day without JavaScript

#35
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.

There are more places to have a browser than on desktop computers, also not everyone wants to waste battery with JavaScript junk, the tag of the 21st century.

Re: A day without JavaScript

#36
>Verdict: Cartography catastrophe.

As much as I hate JavaScript, Google Maps gets a pass. I'm pretty sure the code behind it is thoroughly tested. We can just suck it up and turn JavaScript on for one of the most useful tools from the internet -- how hard is it to find something that whitelists domains to run JS anyway?

Re: A day without JavaScript

#37

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.

Re: A day without JavaScript

#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.

Re: A day without JavaScript

#39

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 sites today are still flat documents pretending to be "apps"!!!

Re: A day without JavaScript

#40

One of my clients loads a 4.5 Mb bower.js (including Angular with a lot of components and jQuery), they also include an extra jQuery script, a full jQuery UI and several other scripts on each pageload . Nothing is minimized. The bower file alone has 300k in comments. The CSS file is also nearly 1 Mb. It's just a simple website with some forms. They have 2 developers working on the site, a scrum master, a project mana…

Chrome 59 has a coverage tool built-in: https://developers.google.com/web/updates/2017/04/devtools-r...

Note: The color-coding is likely to change in future Chrome releases. I am a little surprised to find such an issue in Google software as it is a topic for first semester CS undergraduates ;-)
Post reply on HN