Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

171–180 of 412 posts

Re: A day without JavaScript

#171
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?

> If you turn off JS, you get a blank screen.

I browse with JS on (but I block ads and most tracking scripts) and only use a separate browser profile with JS off for sites that look fishy.

Requiring JS for a web app or interactive features in a website is fine.

A few years ago I had to use an old PC for a while, and disabling JS by default improved my experience significantly, but too many websites simply didn't display any content without JS, or didn't load images. The "web apps vs. web pages" debate has been beaten to death, but being unable to e.g. read a blog post without enabling JS just feels wrong to me.

I'm not sure if things are as bad now.

Re: A day without JavaScript

#172
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…

They can't justify the cost. I wouldn't want them to, anyway. It would mean fewer improvements for their non-crippled site as resources are diverted for the sliver of people who like to be contrarian.

> fewer improvements

so, win-win?

Re: A day without JavaScript

#173

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?

I find that it's at least (usually more) double the work to build the JS-free version of something for a fraction of the user experience. For example, imagine a forum where clicking the "edit post" button turns your post into a editor and saves with AJAX so that you can continue scrolling once you make your edit. To build the JS-free version, you typically need a separate endpoint, a new template, a redirect, and a l…

For me, yes. I should be able to see at least the main content of your blog without JS. I don't care if it's perfectly formatted or styled. Just put the text in a div.

When I go to a blog post linked from HN and see a white empty page I will just move on.

Re: A day without JavaScript

#174

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.

I am so sick and tired of this argument. Having done it several times, no, you do not end up with something as big as jQuery, not by a long shot.

As big as jQuery? Gzipped it's 27k, a ridiculously small size.

Re: A day without JavaScript

#175
post #150

Earlier quoted context omitted.

Which of the sites mentioned in the article would you expect JS to be necessary to use?

I find JS requirements perfectly acceptable for maps, twitter, youtube, and netflix. Particularly maps.

- Twitter, is quite literally, a text based feed. There's no reason for this not to work without JS

- Netflix would depend on what you're doing. Much of it can work just fine as text, images and forms

- Youtube has a lot of text and the videos could be played without JS if they wanted to bother (HTML5 ftw!)

- Maps can also work OK without JS (just without the additional stuff, which is fine for progressive enhancement). Google "google maps without JS" for examples of what other people have done. I'm pretty sure you could also get around JS with pure HTML5 + CSS3, but I have no examples of it

Re: A day without JavaScript

#176

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…

> They have 2 developers working on the site, a scrum master, a project manager and 2 testers

... and daily standups? so busy working that there is no time to do the job

Re: A day without JavaScript

#178
post #85
post #59

Earlier quoted context omitted.

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

> Sure, dude, ignore anyone without a machine that can run MBs of JS within a reasonable time. I'd wager 90% can even run the strawman you're building

"Cell phones."

I'm amazed at how many websites there are on my phone that take 15+ seconds to load... and they've clearly been "optimized" for phones in the sense that the site reacts to being on a mobile browser and lays itself out for a phone... if I wait for the whole thing to load.

(I see this less often, but it's also amusing how many sites pop up their "hey, you've been here for three seconds so clearly we are an integral part of your life from now on even though the main page layout isn't actually done rendering, would you please like us on facebook, subscribe to our newsletter, and tell us your mother's maiden name and SSN? [allow this site to use location services [yes] [no]] [allow this site to push notifications to your home screen [yes] [no]] [allow this site to enter your bedroom at 3am to remind you how much it loves you [yes] [no]]" dialog where both the X to close out and the submit button is unreachable, because the position and zoom is fixed and the whole thing is too large.)

Re: A day without JavaScript

#179
post #131

Earlier quoted context omitted.

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 :(

You can pretty-print the file through the Sources panel.

Re: A day without JavaScript

#180
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…

For #2 (JS abuse by site owners) I wonder if it might be useful to set size limits, like: maximum allowed bytes per resource type (.js, .css, .*), per file and per page, possibly with some local-vs-remote adjustments.

You could just read the Content-Length header and drop the connection if the site is over the user's limits (at which point you'd want to display a status message instead of the partial site).

Post reply on HN