
Create No-JavaScript friendly sites - g-garron
https://www.garron.blog/posts/no-javascript-sites.html
======
mdoms
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/](https://css-
tricks.com/unobtrusive-page-changer/)

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

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

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

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

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

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

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

~~~
tartoran
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)

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

Not all of us

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

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

------
mrspeaker
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!

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

------
robin_reala
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/](https://www.designcritiquecards.com/)

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

~~~
robin_reala
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...](https://www.robinwhittleton.com/2016/09/19/why-we-use-progressive-
enhancement-to-build-gov-uk/)

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

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

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

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

------
chadlavi
Note that this example he gives is not accessible:
[https://codepen.io/victorcopque/pen/OVxRbq](https://codepen.io/victorcopque/pen/OVxRbq)

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

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

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

------
danielskogly
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](https://news.ycombinator.com/item?id=23426951)

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

~~~
a1369209993
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.)

~~~
danielskogly
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/](https://audiomass.co/) [1]
[https://html5gamepad.com/](https://html5gamepad.com/) [2]
[https://agar.io/](https://agar.io/)

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

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

------
city41
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](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)

------
lazyjones
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...](https://web.archive.org/web/20030806180507/http://www.tweakers.net/pricewatch/cat/65)

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

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

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

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

~~~
chewmieser
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).

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

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

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

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

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

------
agumonkey
a quick way to check is to use elinks for instance

~~~
minerjoe
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...?

------
Rapzid
Hmmm... Nah.

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

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

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

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

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

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

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

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

