Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

131–140 of 412 posts

Re: A day without JavaScript

#131

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

On a minified app it only seems to show line-by-line coverage of the minified files and not the source maps :(

Re: A day without JavaScript

#132

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…

Where can we get the bookmarklet from?

Re: A day without JavaScript

#133
Why don't you try browsing the web without CSS enabled? Or just go straight to blocking all HTML?

JavaScript is a core part of website development, regardless if it is not the only way to do it. It is unfair to judge websites on whether they can run without JS.

Re: A day without JavaScript

#134

I negotiate the javascript issue by using two web browsers -- w3m for reading hypertext and Firefox when I want javascript. I'm fine with my bank or an online store expecting to use my browser as a thin client, but if you require javascript to present your blog, I'm going to find a different blog to read. This policy makes it pretty much impossible to use social media, because social media is basically blogs-that-req…

http://mbasic.facebook.com if you ever do miss social media this gets you a javascript-free, minimalist version of facebook. I use it all the time on mobile and get hours more battery compared to their app or standard mobile site.

Re: A day without JavaScript

#135
post #120

If I may, it seems to me like there are several possible points of discussion: 1) Javascript is bad (vs. Javascript is good and variations thereof) 2) The use a lot of websites make of Javascript is overcomplex, gratuitious, uncalled for, intrusive, etc. 3) Sites should provide some (even minimal) functionality to people browsing them without Javascript #1 is largely a matter of personal opinions #2 is a known, unden…

Even though I am a frequent advocate of leaning on more old school techniques for building web apps (even with new school tools), I vehemently disagree that this is a generally worthy cause. A small list of (I think non-controversial) things:

1. You browse without JS. You're a power user. You already know why the page doesn't work. A courtesy message would be nice, I guess, but it seems fairly pointless.

2. Should my HTML and CSS still target IE7-friendliness? IE7 users still have more market share than actual humans who browse without JS. They get treated like lepers in the Year 0, and we all seem to be okay with that.

3. Well-designed use of JS can help distribute computation load that might otherwise all fall on the server. A very contrived-to-be-important (but fairly common) example of this is scaling/cropping an image before it's uploaded. Or, even though I have some other reasons to hate on SPAs, page rendering itself. The no-JS user is more expensive to serve than the typical user.

4. Except for some extreme cases of JS reliance, search engine spiders are a head and shoulders more accommodating to developers' choices than no-JS users are.

I just don't think that making accommodations for no-JS power users, who are not plentiful, and know full well how to turn JS back on, is valuable. Making JS bundles smaller and making them load more efficiently? That's a worthy cause for sure. But people who browse without JS at all are extreme outliers in the 1st world, and all of them know how to toggle it back on. Developing countries? If I were trying to serve those users I would do the research and make choices accordingly.

Re: A day without JavaScript

#136
post #11

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…

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

Good luck supporting old android browsers, IE and dealing with the inconsistencies between browsers. It only takes one look at the jQuery source code to understand why it's not a good idea to "roll your own jQuery".

Re: A day without JavaScript

#137
post #120

If I may, it seems to me like there are several possible points of discussion: 1) Javascript is bad (vs. Javascript is good and variations thereof) 2) The use a lot of websites make of Javascript is overcomplex, gratuitious, uncalled for, intrusive, etc. 3) Sites should provide some (even minimal) functionality to people browsing them without Javascript #1 is largely a matter of personal opinions #2 is a known, unden…

I simply will not spend time tailoring a nascent or even mature product to 0.0001% or whatever minscule percentage of the population turns off JS. If you turn off JS, you get a blank screen. Why should I accommodate your cohort? Why write unit tests for someone who takes a standardish client with above 1% market share and does something completely unstandard with it?

because its good engineering. you don't know what might break your JS in the future. you also don't know which user agents people will use in the future. I was quite surprised to discover that some "UC browser for Android" had quietly racked up a 9% usage[^1]. UC doesn't come without JS, but has a limited feature set, and without feature testing there's a good chance it will break your site. It broke [mine](https://qwtel.com/hydejack/), if it wasn't for feature testing and serving vanilla HTML. Also, and I know it seems impossible, but sometimes programmers ship broken code. Again, not relying on JS gives you safety net to fall back on.

[^1]: http://caniuse.com/usage-table

Re: A day without JavaScript

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

I'd be very interested to see some proper analysis of the difference in speed between HTML/CSS vs just JS, it seems obvious to me that the former would be much faster but then again I know how often "obvious" things are wrong.

the list of sites on https://hnpwa.com/ vs this https://news.ycombinator.com/

Re: A day without JavaScript

#140
post #137

Earlier quoted context omitted.

I simply will not spend time tailoring a nascent or even mature product to 0.0001% or whatever minscule percentage of the population turns off JS. If you turn off JS, you get a blank screen. Why should I accommodate your cohort? Why write unit tests for someone who takes a standardish client with above 1% market share and does something completely unstandard with it?

because its good engineering. you don't know what might break your JS in the future. you also don't know which user agents people will use in the future. I was quite surprised to discover that some "UC browser for Android" had quietly racked up a 9% usage[^1]. UC doesn't come without JS, but has a limited feature set, and without feature testing there's a good chance it will break your site. It broke [mine]( https://…

Nonsense. This is definitively YAGNI. Good engineering is accommodating the greatest number of people with the resources you have in the least amount of time. Thinking about some abstract future scenario is categorically not good engineering.
Post reply on HN