Hacker News new | past | comments | ask | show | jobs | submit login
Create No-JavaScript friendly sites (garron.blog)
123 points by g-garron on June 22, 2020 | hide | past | favorite | 128 comments



I absolutely agree that JS is over-used, but for anything other than very static content I generally am not interested in kowtowing to the strict "no JS" folks. Javascript has become a fundamental part of the web, and for the same reason I won't put in extra work to make my sites work in IE, I also will not put in extra work to make my sites work for (a vanishingly small number of) people who pre-emptively block one of the most powerful tools in my belt.

On a side note, the first example the author uses for a menu alternative[0] is highly obnoxious. The "unobtrusive" example assumes that your page is written in PHP but doesn't declare this assumption up front, it leaves it until half way into the article. The example is not usable in a static website that won't properly handle a POST request. So the JS example is still vastly superior for many cases.

[0] https://css-tricks.com/unobtrusive-page-changer/


> for anything other than very static content

Honestly, that would be a damn good start. Just the other day I took a look at a job posting here on HN. It was nothing more than the company logo and the text of the rec. After JS was enabled, that is. Before that it was just the plain text string "You need JS enabled to run this app." What fucking app, lol?


Literally modern frontend frameworks that don't want to do SSR.

Is it that surprising?


The only useful content on the page was not only static text, but static plain text.

If the modern frontend framework can't display that without JS, then I think it's fair to call it a shitty frontend framework.


More so it's not configured to do that - which depends on the priority of the team working on it.


Well that's true for anything, so it means nothing. I know someone who was told with a straight face, in a meeting about an out of control memory leak in some software, "not leaking memory wasn't in the requirements."


LOL! That must have been some poker face! Unbelievable!


I mean, they're not wrong, but I've handled that stupidity by making sure my next requirements included "Do not have sexual intercourse with your coworkers" and "Be a professional software engineer"

Edit: It's kinda like the story of the guy on the ship who was forced to write accurate logs and wrote "The captain was not drunk today"


And leaking memory is actually a valid tactic when you're writing software for financial systems that have scheduled times to turn off.

In various HFTFs GC is completely disabled since that valuable cpu time is useful for other things.


JavaScript poses a large security and privacy risk.

Think browser fingerprinting, XSS, JS-based analytics, poor or missing CSP + hijacked npm modules, etc.

I generally keep JS disabled as much as possible.


You can perform analytics almost as well from just the HTTP headers, you don’t need JS at all for fingerprinting, and hijacked NPM modules are probably still present even if there is no JS pushed into the browser.


Curious, how do you do fingerprinting without JS? User agent, header order, etc? How well does it work?


Basically, each layer of any implementation of the OSI stack will have its own peculiarities. E.g. there's a paper on re-identifying computers via TCP clock drift.

How well they work depends on the amount of effort you're putting in. Since Javascript is easy and offers a very rich attack surface, there seems to be little rain to really plunge the depths of other layers.


Panopticlick did some of this with headers included, their order, and their timing. Which of course can be defeated without much loss of features. Tor Browser being one example


Cookie?


and also transparent pixel


That's great and it's your choice to disable it but his point was don't expect developers that rely on JavaScript to power modern web experiences to develop their site to fit your strict requirements.

JS does way more then just fingerprint users and open up security vulnerabilities. You're in a minority that's asking for fall-backs in a world that's so far removed from simple <noscript> fixes.


> power modern web experiences

So they're going to expect me to leave a major malware and privacy-invasion vector open so they can indulge in creating their 'web experiences'.

Nope. This sounds like kids playing around, not professionals working.


Ahahaha come on my guy, effective people get to where they are because they can make good risk/reward assessments. Turning off javascript hasn't been worth the opportunity cost to a "real professional" for decades.


Security researchers and activists in oppressive regimes are professionals. And it's amazing how fast one can end up becoming one when your employer gets badly hacked or your government changes for the worse.


I'm not saying there's no reason to turn off javascript, or that there aren't professions where that's a good default. But it's absolutely not the norm.


> because they can make good risk/reward assessments

Indeed, and I made mine. No ads, not tracking, no risk of malware, no need for virus scanner, high speed page loading (ahem, when it works). Worth it? For me, sure! Peace of mind means a lot to me.

What's so hard about making web pages that don't use unnecessary tech?


There's nothing wrong with it, I AGREE with you that we shouldn't ship 5 megs of some garbage framework with every blog post. The point I'm responding to is that it's somehow reasonable or common for "professionals" to run with JS off, and to not do so is "playing around". It's not. It's a very niche thing that very few people get an actual benefit from.


Nonono, that's not what I said (well, not what I intendeded, I suppose it was ambiguous). "kids playing around, not professionals working" was referring to web designers indulging in their 'web experience' crap at a cost to the users, NOT to those who might run with JS off.


I am a professional, and I primarily browse with it off by default and whitelisted for only a few sites. I do have a JavaScript-enabled browser for user-hostile websites which require it, but I rarely need to use it (and I have real animus against those which force me into doing so).


> to power modern web experiences

This would seem an opportune moment to point out that modern does not always equal good.


"...JavaScript to power modern web experiences..."

What the hell are 'modern web experiences'? If you mean unacceptably slow, jittery pages loaded with megabytes of useless crappy data whose only purpose is to spy on users then I don't need them. I always avoid sites like that (and there's plenty more fish in the sea).


If Gmail or Twitter can do it, so can you. And hey, plain-HTML Gmail is actually vastly faster (noticeable even on my gaming PC, and much more so on my banking laptop) and basically as functional as the "regular" one.

Javascript is unneeded for vast majority of use cases, or is needed as an optional extra (like client side form pre-validation). 99% of existing Javascript on most websites is garbage that actually detracts from user experience; and it tends to grow like cancer - where one could get away with some nice enchantments on an otherwise Javascript-required website, one tends to instead end up with a slow, bloated monstrosity with pointless animations, sliding, etc. that cannot be used in multiple tabs, doesn't have capacity to link to a section of itself, etc. (see Chase banking website, for example)

And that is why I personally think no-JS should simply be an ADA-based legal requirement, like handicapped spots. That would force the usage patterns to move in the right direction.


> If Gmail or Twitter can do it, so can you.

I don't have the resources or user base of Gmail or Twitter. Not even close.


Making a HTML-only website backed by server-side code is generally easier than having two interacting application - one on server, one on client. My point was that even complex, popular apps can easily be implemented in HTML-only without loss of functionality.


> Javascript has become a fundamental part of the web, and for the same reason I won't put in extra work to make my sites work in IE, I also will not put in extra work to make my sites work for (a vanishingly small number of) people who pre-emptively block one of the most powerful tools in my belt.

Perhaps you should just try without JS one day and you might be relieved off a large burden that comes with JS (a lot of security issues, complexity, organizing files and loading, crawling and indexing support). I think the threshold for switching to JS use should be higher than it is currently for all the people who just use it by default.


You are wasting your time preaching to those who've an agenda, presumably the author gets paid for writing JS so even if he/she actually recognizes the advantages then he/she isn't likely to follow up.

It's occurred to me from reading these posts that we need a few good coders to develop some logically equivalent test sites one using JS and the other without then advertise the fact on HN so as everyone can see and compare.


What percentage of city bus riders or public restaurant visitors do you think use the wheelchair ramp?


In my opinion, that is not a fair comparison. Wheelchair ramp usage percentage may be small but they are built because of laws and helps people who actually need it. People are not disabled by choice.

Javascript disablers (and I have full sympathy as a dev. myself) are doing it by choice which is totally fine but it is still a choice, not a need.


I would argue that privacy is a need.


"...not a need"

By what criterion do you define a need? I've suggested some in my post that could easily be deemed a necessary requirement to require JavaScript to be turn off. It depends on one's circumstances.


A lot of visually-impared users have to disable javascript to minimize pop-ups to use a braille terminal.


Don't expect typical web developers to care for 1-2% blind users when they've often ignored browsers with 5% or higher market share... Most don't understand that a one-time effort to get the last few % in revenue is worth it.


What percentage of people in wheelchairs are able to walk but choose not to?


Counting people with a broken leg who could use crutches but would be risk of further injuries due to avoidable things like falling over? More than the zero percent of people with javascript disabled who don't need either security or privacy.


There's a difference between a small percentage needing something and a small percentage wanting something, though. If all wheelchair users could turn off their handicap at any time with no consequence, I think you'd be hard-pressed to find a wheelchair ramp anywhere.


If all JavaScript blockers users could turn on JavaScript at any time without consequences to their privacy and security, you'd be hard pressed to find JavaScript blockers as well.


If they're really concerned about privacy and security, their machine would be air-gapped and the web wouldn't even be available as an attack vector. What it really is though is a superiority complex fulfilling their need to be "better" then filthy JS developers who don't code in Rust and Scala.


If I have a client requirement that calls for a high degree of accessibility this obviously changes my approach. I'm talking about things I make for myself, or for clients with less stringent requirements. Same argument goes for the IE crowd.


Screenreaders (including free and built in ones) have had JS support for quite a while. Using JS is very far from being the limiting factor for robust accessibility.


I wonder who bothers to test their wonderful experience product on a screenreader. Regardless of this and regardless of the security threat JS execution poses, I find it hard to use the internet with JS disabled. However, when it comes to SPAs, I find that I like the older version of the website way more and also find it a whole lot more intuitive and usable.


TBH this comparison is a bit offensive. One can choose to use JS or not, those who are no a wheelchair cannot choose to walk.


Public sector work makes these things a requirement, it doesn't have to work on IE, but it helps a lot if it does because lots of law firms have only got IE. JS is the same, we don't add in JS unless it's necessary, but there has to be a no-JS fallback option, which can be less pretty but still needs to be functional.


Correct, that's how it should be. A non-JS fallback ought to be essential for every site.


> I won't put in extra work to make my sites work in IE

From my experience, running websites in Germany,

- you can still expect ~20% of desktop users to surf with IE or legacy Edge, and

- the above percentage is higher the older your users are (and lower the younger they are).

Also note that end of support for IE is still 5 years out.

This may be insignificant to you. For others, IE support is essential.


I've spent most of my career as a front end developer. We have three tools in our toolbox: HTML, CSS, and Javascript. We need them all and will push each to the extreme to create better experiences for our users and reimagine what the web can become.

I also work in the healthcare space with heavy HIPAA security requirements. Like any language/framework/platform there are best practices to follow for solid security and performance, and a good secops team should set meaningful requirements.

In short, I will show a "This site requires Javascript enabled" message 100% of the time if my site requires Javascript.


> and will push each to the extreme to create better experiences for our users and reimagine what the web can become.

OMG. For this 'better experience' and 'reimagining what the web can become' did you bother to ask the users you pretend to cater for? No?

Listen carefully: the only experience I want from any website is to get to it, get the info I want, then I fuck off sharpish. I do not want 'experience' or any bloody 'reimagining' thank you. I have work to do.


Seconded. 99% of the crap on websites is not the information I need and it's wasting my limited resources:

- battery - monthly bandwidth cap - RAM - attention (pop ups, things that blink, things that scroll) - patience for privacy breaches

Pure text is the "better experience" most people want.


The obnoxious thing about this comment is that we often do ask users. Every company I've worked at does user testing and surveys, etc, and no one has ever complained about this stuff. Users do get excited for more interactivity and intuitive functionality, which is easiest to build in Javascript. You're assuming we haven't asked, when actually we have, and everyone else disagrees with you.


Thank You! I could not have said that better myself.


It's also their site... to make how they want.


The people who share your sentiment are a tiny minority, like IE users.


The web is more than static websites.


Sure - see my comment elsewhere where I acknowledge that. But all I'm asking for is static sites where static sites are appropriate.


> I've spent most of my career as a front end developer. We have three tools in our toolbox: HTML, CSS, and Javascript.

While it may be common, this seems a somewhat problematic framing of things. You're first responsibility ought to be to an analysis of the problem space, determining the appropriate tool to use based on the needs of the project. If you've already chosen the solution before you've even considered the problem, then of course you would have trouble conceiving of the options outside that narrow set.


"In short, I will show a "This site requires Javascript enabled" message 100% of the time if my site requires Javascript."

That's why we users need replacement/plugin alternative JavaScript engines that will allow users to tweak settings and to send feedback/info back to the website that the user thinks that the site should receive. You or the site can then remain blissfully unaware that what you are receiving from the user's machine is cleverly-framed (disguised) garbage.

Sooner or later we'll have a plethora of such engines and then the tide will have turned.


> to create better experiences for our users

I do not fucking want an "experience", I want hypertext with some images.


Touché! Precisely!


@mdoms

"I won't put in extra work to make my sites work in IE, I also will not put in extra work to make my sites work for (a vanishingly small number of) people who pre-emptively block one of the most powerful tools in my belt."

Well, I'm glad to be one of that vanishingly small number who still has the wherewithal to block one of your most powerful tools—as we've damn good reasons to do so.

I could be as rude and as arrogant as you have been and just state my piece then leave—which is that things were absolutely fine with the internet until @#$%^&!)s like you came along and &^$%&* it up with JavaScript—but I'll actually proceed on and give you a few very good justifications as to why JS stinks! I know I won't change your mind but hopefully a few others may take cognizance from this summary.

First, it's not JavaScript per se that's the problem, rather it's you web developers who are at the heart of the trouble. The fact is you don't know how to or won't use JavaScript responsibly. Tragically, putting JavaScript into your mob's hands is about as irresponsible as giving kids a loaded 105mm howitzer to play with.

Let's begin (this is the short list):

1. Technology to do everything that most visitors to websites wanted to do was already in existence before JavaScript came along. Back then, the only things that we users had to content with were irritating animated GIFs and 'sparkling' text and the like but they pale into insignificance compared with the problems that JavaScript has brought for us users.

2. JavaScript slows the rendering of many website pages down to an absolute crawl. Moreover, I'm not talking about a minor degradation in page-rendering speed either, in fact it's an enormous reduction, so much so that it's hard to believe (unless you're one of the sans-JavaScript cognoscenti who's already applied the 'secret' of turning JS off). …And it is a secret you developers wish to keep too; for obvious reasons it's not a topic you JS devotees want aired in public (discussions such as this are rarely debated in the tech press and when they are they're kiboshed at the first opportunity).

3. JavaScript introduces irritating time transitions into the time it takes for web pages to render. Frankly, these jerky effects and 'noisy-like' delays irritate the hell out of many of us users. Of course, you developers probably don't even notice them as you've the latest-and-greatest high speed hardware which (often) reduces them to a tolerable level—and even if you did you wouldn't care anyway as JS serves a much too an important role for you web-side developers to bother eliminating the problem. Anyway, we users have a solution—just switch off JavaScript and voilà the problem instantly vanishes.

4. Nuking JavaScript stops—kills stone dead—the vast majority of painfully irritating ads, popups begging for subscription as well as all those other annoying and unnecessary animated visual effects that so often fills web pages. Not only are they distracting but also they clutter pages and obscure text. Again, our solutions is to turn off JavaScript and we're now back in control—not the website. You don't even need to install sophisticated script blockers, NoScript etc. (it's a no-brainer really).

4.1 If you're worried that you might have to turn on JS in a hurry and the settings aren't available or immediately accessible then just install a Toggle JavaScript add-on into your browser. It will install a button on the browser's Navigation Bar that allows you to toggle JS on and off (nothing could be simpler). (Incidentally, it hasn't gone unnoticed that you website developers have managed get browser developers to remove the JS on/off setting in the setup/preferences menu of some browsers, for example, Firefox.)

5. Another huge gripe among many users is the obnoxious practice of websites stopping users back-linking to the previous page as sites deliberately break or expire the page immediately the user moves forward—and they often do so without any good reason (i.e.: when there's no real need for security). Even 'good' sites such as DuckDuckGo are into this damned annoying caper. If that were not enough, we see websites regularly abusing—deliberately punishing—users who refuse to use JavaScript by rendering the visited page blank unless JavaScript is turned on. Then there's the annoying practice of websites using overlays to force users to do the website's bidding. This is nothing other than abuse of the user by the website—it's a case of 'we'll fuck you up properly unless you do exactly what we damn-well tell you to do!' You developers really do have a damned hide and what makes it much worse is that you actually get indignant because some users "...pre-emptively block one of the most powerful tools in your belt". With an attitude like that then fuck you!

5.1 What is it about you power-hungry control freaks that make you so nasty and antisocial? Have you ever heard of the science of ergonomics or even diplomacy? Perhaps Dale Carnegie's How to Win Friends and Influence People, should be a part of the JavaScript syllabus: https://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influen...

6. When I first started to use the internet a page of text was 2k bytes in size; nowadays, it's usual to see web pages blow out to between 1MB and 5MB which is just outrageous. Turning off JavaScript can prevent some of this traffic downloading. This not only speeds up web page rendering but also saves your line/data costs. (Remember the user is the one paying for the data costs—not you! It would be interesting if governments were to tax websites if pages exceeded a certain size—after all, large web pages are unnecessarily contributing to greenhouse gasses. Methinks a carbon tax on excessively sized web pages would be a brilliant idea!)

7. Without JavaScript, cryptominers find it more difficult to use your machine's CPU time for calculations; similarly, identity theft is more difficult so is the ability to take over your machine or put dangerous payloads on it. Moreover, even figuring out your time zone and location becomes more problematic for the remote website if JS is disabled. This all helps to maintain privacy.

8. Without JavaScript most invasive trackers are blocked, so are many of the privacy-invading techniques used by websites. Without JS, websites can't even stocktake users' font lists let alone use many of their nefarious tricks to spy on them. To get some idea how effective turning JS off is, visit EFF's Panopticlick website, https://panopticlick.eff.org/, then toggle JS on and off. Nuking JavaScript isn't a universal panacea for privacy nor will it completely stop browser fingerprinting but it's a damn good start! Here's the results of Panopticlick's test on my browser sans JS. You'll note that without JS switched on, 18 pieces of private information were blocked from this nosey test site.

Screen Size and Color Depth — no javascript,

System Fonts — no javascript,

Limited supercookie test — no javascript,

Hash of canvas fingerprint — no javascript,

Hash of WebGL fingerprint — no javascript,

WebGL Vendor & Renderer — no javascript,

Language — no javascript,

Platform — no javascript,

Touch Support — no javascript,

Ad Blocker Used — no javascript,

AudioContext fingerprint — no javascript,

CPU Class — no javascript,

Hardware Concurrency — no javascript,

Device Memory (GB) — no javascript.

9. Not satisfied with all that lot, you mob want even tighter coupling into the innards of our machines, to do that you've even 'conned' the W3C, World Wide Web Consortium, and IETF, Internet Engineering Task Force, to adopt new technologies such as WebRTC. These technologies further obfuscate what websites are doing on users' machines.

It's precious little wonder you website developers are so enamored with JavaScript. You've never stated the real reasons why JavaScript is so essential to your existence, it's been your dirty little secret for many years and it's time we users spelt it out in spades. At no time were we users ever consulted about JavaScript's invasive features nor were we ever told in advance that you were going to steal our privacy and to do so you'd use JS as your frontline tool.

Finally you need to recognize that many of us just DO NOT want fancy wanky web pages! When I read a book I'm not distracted by subscription notes popping up out of the page and I don't expect it to happen when I'm visiting a website! Just because the technology allows it, it doesn't mean that it should be used or abused. (I note you're not alone here, TV and video editors are forever fast-cutting or using damned annoying distracting visual effects.). If you feel that you must cater to the attention-deficit generation who needs baubles bangles and beads bobbing around every second then produce two threads to your websites. The fact is that most of you developers have fuck-all knowledge of user ergonomics or how the human mind actually absorbs knowledge. As a starting point I'd strongly suggest that you at least have the decency to recognize your limitations.

It has to be said that we users are at war with you and your websites—a war that you started and that up until now one in which you have held the advantage. These days, with privacy being on everyone's lips, I can only hope that eventually things will turn in users' favor. You web developers have so maimed, distorted and damaged the internet over the last 20 or so years it seems to me that eventually the scope of your work and how you carry it out will—of necessity—have to be legislated. It only takes one country to introduce laws and regulations and the dominoes will soon fall. The sooner it happens the better.


This is unhinged. Seek help.


OK, you've started with an opinion. Now use formal argument with evidence to rebut the claims (they're pretty specific so don't wander too far off topic).

It's funny how they become speechless and all go to ground at this point.


Well, I hope you then also avoid 3rd party JS and make your own first party served JS free a.k.a. libre., non-minified and readable. Then I could accept your JS to be run on my machine. If you already do so, thank you for being such a good example.


Most of my web browsing experience these days involves moving the dancing monkeys out of my way so I can read the content. Nobody comes to your site to see the ads or take your survey or sign up for your email list. Nobody comes to your site hoping to have to click again and again to read the content. Nobody comes to your site hoping to have you explain to them what a cookie is for the 10,000th time and then be forced to click "OK!" before they can read your content. Nobody comes to your site hoping to have their browser fingerprinted so you can track them around the web and sell their personal information.

With very few exceptions you are using Javascript not to enhance your users' experience but to make war on them, and if that applies to you I wish you would leave technology and take up farming.


Similar to the general negative experience with many Electron apps, I hate the JavaScript based rendering experience on some sites. I get very frustrated with reddit (the new UI) and Facebook, both flashing an animation or empty rectangles for a long time and me realizing that the content isn’t going to load at all and hitting the reload button to coax it to render the best time. The experience I get on these sites and also some on (not all) React based sites (including Gatsby blogs) is jarring in ways I can’t explain well. Even the full page reload of years past doesn’t evoke such a feeling of uncertainty on whether the content will load or not.

Blocking JavaScript by default also makes for faster browsing on many sites. Sometimes it also bypasses all those Adblock Killer dialogs or paywall dialogs.


You're probably aware, but just in case: old.reddit.com gives the old (js-free) interface.


That until the old reddit is deprecated. They want people to go ahead use the new interface because it makes it much easier to insert ads, track and do who knows what kind of other shenanigans.. The thing is for us who've known a better and more usable internet, we have something to compare it to and simply say no. The newer generation of users accept it for what it is, they don't know better.

Something else irks me quite a bit as well, and that is when you can't copy a link from the page or when the history is messed up when going back. It seems utterly broken, and most of the time the design is as well (but that is somewhat subjective)


> The newer generation of users accept it for what it is, they don't know better.

Not all of us


Seriously, kudos to reddit for even if them insist on doing the pointlessly, blatantly wrong thing, at least doing it the right way. I honestly thought they would have pulled some deprecation bullshit by now.


If you have an account, there's also a preference to make www.reddit.com use old reddit.


I love JavaScript, but no longer trust websites to use it responsibly. There are too many vectors for tracking, so I'm forced to block. I do way too many random clicks in a day to allow JS by default.

Half the pages I land on now say "you need JS to view this site", and that's totally their decision! I close the tab and do something else: they get to use JavaScript, I save a bunch of time and procrastinate less... win-win!


Well, it's just as bad as native apps now. At least you can trivially block things in web browsers.


One of the biggest annoyances is sites that use stylesheets to blank out the page until Javascript removes that style. I think this is to stop "flash of unstyled content" stuff that I really don't care about, but it's also trivially solvable by having Javascript add the style in question in the first place.


It's one of the reasons I also started to block CSS, too. Sites tend to load quicker but I need to do more scrolling.


I built a side project a couple of months ago[1] that’s a PWA-installable interactive experience, but also degrades down to styled information in the absence of JS, and back to raw HTML if CSS fails. It’s surprisingly fun to build in this way.

(On another note, choosing to avoid a framework and just use some vanilla JS led to an extremely fast loading site.)

[1] https://www.designcritiquecards.com/


congratulations, but how many people have the time to do that? Is it really feasible on big projects?


Depends what you’re doing. The majority of the site I work on for my day job is statically rendered and theoretically works without JS, but large parts (including any ecom functionality and profiles) fail. Would it be worth making them more reliable by falling back if JS fails? Possibly, but that’s difficult sometimes to argue for in today’s environment of features-first from product, and developer-experience-first from engineering. Still worth the effort.

By the way, we are talking about reliability-in-depth here rather than user choice. I wrote a blog post about this a few years ago: https://www.robinwhittleton.com/2016/09/19/why-we-use-progre...


I applaud sites that work without Javascript.

The sad reality is that the enormous popularity of SPA frameworks like React and Angular make this possibility a small fraction of important sites — e.g. I don’t know if any banking or investment website that works without JavaScript.

Maybe this is less important as app-culture supplants such sites.


Most sites aren't important sites and most sites aren't handling monetary transactions or private information. Most sites have no dynamic content. Most sites don't need javascript at all and all it does it makes things worse.

Most devs need to stop taking the crap tools they're forced to use at their paid job and using them for their personal websites.


I agree. Unfortunately, it seems that Most Devs either don't agree with us or don't care.


Both of those frameworks support SSR, and can then be made to work without JS on the client side for many use cases.


I recently wrote a blog engine as a way to learn some technologies I haven't used.

For static pages, I only use in-browser JavaScript to format dates to the reader's locale. If, for some reason, the JavaScript doesn't run, the date will just be formatted a little differently than I'd like.

Not too big of a deal.


I am currently rewriting one of my companies site using Hugo, and good part of the reason is to be able to get rid of JS, it keep giving us more trouble than it is worth, constantly.

At first I was afraid my new site would be ugly and all... But I got pleasantly surprised by how good HTML 5 is right now, I am yet to find anything I want to make that I can't make with just HTML and CSS.


Note that this example he gives is not accessible: https://codepen.io/victorcopque/pen/OVxRbq

A keyboard user cannot access the hidden checkbox that controls showing/hiding the menu.


I wonder if a better usability example would use the <details> and <summary> elements, which support collapsing/uncollapsing.


I've improved the demo with <details>/<summary> and fixed the erroneous list elements form the original: https://habarnam.ro/s/demo.html


I wrote about a generalized way to use React, Redux and SSR to make sites that work without JS a short while ago[0] and I’m currently employing that strategy for a side project I’m working on.

So far the biggest drawback is not being able to do a payment flow with Stripe Checkout without requiring JS on _my_ service, because Stripe.js is required to redirect a user to the checkout session.

[0] https://news.ycombinator.com/item?id=23426951


And my response was a big thank you but some serious doubts. I'm asking for no JS when it is reasonable, and what you are trying to do is accommodate my unreasonable requirements. If I may repost past of what I said there:

"I should clarify, I'm only moaning about JS used where it need not be, in the display of text and pictures. Essentially, stativc web pages. There are guys on this thread who are trying to make apps work withou JS and I'm getting uneasy about that - that level of functionality should, and perhaps must, be done client-side or the excess bandwidth and server-side load will become unmanageable. I would still not enable JS to allow those, but I can see why others would."

Trying to allow for extremists like myself, well, you may be doing too much in this particular type of case. Just giving me sensible static websites is fine, I'm not asking for more.


Pretty much this. If you're actually shipping a web app (canonical example being a HTML5 video game), use Javascript; that's what it's for. A newpaper (/ blog / search engine / forum / user signup <form> / image gallery / video gallery (as opposed to player, although that should have clearly marked links to inert mp4-or-equivalent files) / file hosting service) is not a fucking app, but that doesn't mean nothing is. (Note: I don't know enough about stripe to say anything about danielskogly's specific case.)


I completely agree, and acknowledge that there are plenty of web apps that just can't work without JS [0][1][2]. It's the middle ground of web apps that I think might have the most to gain - web apps that _can_ provide their main functionality without JS, like Asana, GitLab, Product Hunt, Pinterest, etc.

[0] https://audiomass.co/ [1] https://html5gamepad.com/ [2] https://agar.io/


I get what you're saying, and for many use-cases fully static websites is all you need. What might have been a better title for my post is "(Coincidentally) accommodating [..]", as the main target audience still remains users _with_ JS. By following some guidelines, using a couple of helpers, and avoiding certain interactions for _required_ interactions - ie. you can have sparkles on mousemove all you want, but don't gate important app functionality behind it - you will _also_ support users without JS. If the implementation cost is low, the potential gain of you and other users who might enjoy a JS-less experience might well be worth it.

For my part, I'm developing a service targeting privacy-minded people, and the ~1.75m NoScript users/installs are then among my main target audience.


Always. My blog view is exactly the same without JS, Lightbox works as simple links and the burger is functional: https://www.rado.bg


I agree with the author, and think this is important. But I also want to point out JS enables one to build interesting sites without a backend, by relying on data from third party APIs. Being able to quickly do "mashup" sites like this can be pretty great. The time it takes to build them is usually quite short, and the hosting is almost always free.

As an example, I am currently building this site, https://mi-cov.com, which I can host for free since the data comes from a government API. (The site is not done yet, I'm aware of the various issues it has)


I am old. Back in 1995 web sites loaded faster with 14.4k modems than some of them load today with 200mgps connection.


Does anyone else fondly remember the time when JS was often used to reduce page size and increase loading speeds?

Here's an example from memory: https://web.archive.org/web/20030806180507/http://www.tweake...

As download speeds increased, this went out of fashion, only to be replaced by (often obnoxious) JS-based UI elements.


You can use a tracker blocklist, so you don't have to disable javascript: https://github.com/notracking/hosts-blocklists


This looks like a dns-based solution? Most people are not going to install pihole at home. Other dns-based solutions require per-device configuration, and when you have a family with a dozen or more devices, this does not scale.

That’s why ublock origin and friends are so popular.


Most people aren't going to outright block JS either. It's a workable solution for people that block JS due to trackers (albeit not a foolproof one).


That's not the only reason to disable Javascript. The only way to ensure that code doesn't have any negative consequences is not to run it; post facto remedies can reduce known classes of threats significantly, but not remove threat entirely.


People like interactive sites which give immediate visual feedback for actions.

Aside from the tracking stuff it's a better user experience, so it's unlikely to go away, especially if the demand for no-js is tiny.


> People like interactive sites which give immediate visual feedback for actions.

Precisely. That's exactly what you get by disabling javascript on most sites.

Two of the fastest sites that I know are sourcehut and the D-language forums. They are much snappier than any javascript-infested site.


You can have your cake and eat it too. Use progressive enhancement/graceful degradation so that users with JS get immediate visual feedback, and just fall back to reloads without JS.


That's more work and more messy than just writing the whole thing as a SPA from the beginning IME. I'm talking about real interactive applications, not simple blogs.


Is there an ADA angle to sue people (especially various govt agencies and stuff like banks) for discrimination based on inaccessible websites? I'd donate a lot for a credible push for bloat-free web.


I'd run JS by default if I could trust random sites on the internet. But, you know, that's not really a thing unless you're really naive.


a quick way to check is to use elinks for instance


This. My main browser is a modified links2 running in a framebuffer with guile integrated for serious interactive hacking. Even on this circa 2006 computer it screams loading pages. No javascript though, so my HN experience does not include any voting, eh, who needs that...?


Hmmm... Nah.


I'd like to say that ship has sailed, but in this case it's more like the last rocket launched, Krypton was destroyed, and the last partisans of NoScript are trapped in the Dark Zone, or whatever the thing with General Zod was called. Not that big of a Superman fan.


I am one of those dinosaurs that still surf with javascript (mostly) disabled. I use uMatrix to control where I accept it from and my default is to allow none to load. A remarkable amount of sites still work and you will always need to load some to get certain functions to work.

However, I am always amazed how lazy devs are when it comes to purely informational sites as there should be no need to require javascript. Sure, it might help with certain cosmetics but the people who disable javascript rarely care about cosmetics (it is nice, sure, but if you cannot view the site without enabling a bunch of untrusted code to run on you computer then I really must want to visit it to enable it and reload the page).

Hackernews, LWN, arstechnica are all sites that works really well without javascript enabled (ars needs it for comments, but I rarely comment so if I want to I can enable then). Reddit and many more sites somewhat needs to it but you can usually see the interesting bits without it, so if you are invested or a common visitor it is easy to enable the few needed.

If you are directing your content towards the technical community, my advise would be to definitely test it without Javascript, preferably in a text only browser also. It does not need to look super pretty in these modes, but it should work. This is probably also a good foundation to provide the content to groups that uses accessibility software (think blind), but I do not know how well those tools handle JavaScript-dependant content.


You can access Ars' comments without JS by using the forum.

https://arstechnica.com/civis/viewforum.php?f=2


Thanks! That is really helpful!


Though if some people want to make websites for the 0.4% of clients that won't allow JavaScript to load, I hope they enjoy their niche hobby.


Yup, not enabling javascript is akin to using an outdated browser for better or for worse.


Disabling JS protects you from cross site scripting, invasive tracking and cryptominers though. So there‘s definitely a plus. I would like to know the percentage of sites that use JS for actually improving the user experience (e.g. voting not requiring a page reload on HN) vs. those where it‘s just a gimmick (e.g. „want to talk?“ popup). I expect the majority to fall in the second category. So I applaud every effort of websites getting rid of their JS.

Disclaimer: I have JS enabled.


Disabling Javascript makes video game wikis, recipe webpages and news articles far more usable for me. The primary content of these pages is text written in HTML, and leaving Javascript on means that the ads will make the webpage clunky, scroll badly and occasionally consume enough memory to crash the tab.


But the sites need revenue too, so the way to make ads go away is coming up with a ubiquitous micropayment system which can compensate the site editors if no ad is shown.


That's fine. If someone builds that, I'll sign up.

In the meantime, their need for revenue is not my problem. I do not feel bad about preventing their ads, trackers, and malware from consuming my battery and bandwidth.


Leaving javascript running is akin to opening every email attachment you get.


The OMG JavaScript, parade of articles is tiresome / endless and IMO is trending towards the absurd, and it kinda irks me.

I could really go without ever hearing someone bemoan how they rewrote an internal react site in 10 seconds with two lines of JavaScript, or whatever old wives tale they've got going on. If it was that easy then maybe it also wasn't the end times?

Yeah there's a lot of pages that maybe could get away without JavaScript. But man it's not the 90s anymore, many site owners want lots of dynamic app like behaviors, and there's a real question there between "this reader doesn't want it" and "the person who is paying for the site wants some stuff".

Maybe someone has Homer Simpson's web page level absurdity with JavaScript, and maybe that's Homer's page and that's ok?

The browser now effectively runs apps, so it's not just going to read HTML, that's how it is, and that's a good thing the web does so much more now. Does it do everything we want / how we want/ no ... but I don't buy into the idea of a end user only web where we have to bow to the lowest common denominator as far as acceptable levels of interactivity or tech usage....


> The browser now effectively runs apps, so it's not just going to read HTML

The problem is that browsers are running apps when most users just want to read relatively static content. Our ever decreasing, day-one battery lives and swelling landfills are clear evidence this isn't sustainable.


> most users just want to read relatively static content

The most oft-complained about sites (news sites, "blogs") don't really care what you want. They care about engagement, monetizing, and/or conversions. That's much more difficult without JavaScript. If you have it disabled you've limited your value to them anyways.

Aside from the small number of altruistic orgs like WikiMedia your complaints about JS will fall on deaf ears.


I'm not convinced that most users really care.

Their eyes read, but they still interact as well.


Agreed, I'm pretty bored by the influx of "No-Javascript" articles being pushed to the top of HN weekly.

There is almost never any new insight, and you could copy+paste comments from one to the next and not know the difference.

We get it, Javascript is the worst and everything should run perfectly without it - at least to the vocal minority of users who actually care (which is basically just HN's demographic).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: