```
||||| _ _ _ _
= Z . = | |_ | | |_ __ _ _ _ _ ___| |_
= , = | ' \| | | ' \| ' \ _| ' \/ -_) _|
= o ` = |_||_|_|_|_|_|_|_||_(_)_||_\___|\__|
|||||
```
# The Web Without JavaScript
_April 24, 2024_
Today is 04-24. Because this sort of resembles the [424 Failed
Dependency](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/424) HTTP
response status code, it has been proposed to call this the [JS Naked
Day](https://js-naked-day.org) in order to promote the ["Rule of Least
Power"](https://www.w3.org/2001/tag/doc/leastPower.html) as described by the
[W3C](https://en.wikipedia.org/wiki/World_Wide_Web_Consortium) in 2006.
JavaScript is very powerful and is essential for some types of websites to even
function. However, it also has a tendency to be abused to the detriment of
users. This may be in the form of e.g.
- worse user experience, e.g. sluggish, lacking accessibility or annoying
pop-ups,
- increased tracking due to e.g. fingerprinting and third party data collection
(e.g. Google Analytics),
- increased traffic in case of many or large scripts,
- increased power consumption in case of bloated scripts,
- and even cryptominers using your computer resources to mine cryptocurrency,
and possibly many others. Another risk of JavaScript is executing malicious
code due to e.g. [cross-site
scripting](https://en.wikipedia.org/wiki/Cross-site_scripting), compromised
domains or simply a malicious website. Even vulnerabilities like [Meltdown and
Spectre](https://spectreattack.com/) could potentially be exploited with
JavaScript.
In general, I want to choose what software is run on my own device, so I have
since long had an opt-in approach for enabling JavaScript if I feel that a
website actually needs it and is unlikely to abuse it. This can be done with
e.g. browser extensions such as [NoScript](https://noscript.net/) or
[uMatrix](https://github.com/gorhill/uMatrix). This approach has in my
experience become increasingly painful over the last 10 years or so due to
websites becoming increasingly dependent on JavaScript.
## Blank pages
Many websites are completely unusable without JS and show nothing but a blank
page, not just ones that are highly interactive but also websites that only
serve basic content that is mostly text or images. Several of these website
were completely usable a few years ago without JS while still offering more or
less the same type of content.
Websites that choose to require JS just to serve simple content unnecessarily
makes it less accessible by completely shutting out e.g. console web browsers
and often crippling the experience for low-end devices such as mobile phones.
Examples of websites that are just blank include:
- twitter.com
[Twitter](https://twitter.com) has somehow become the global broadcast
service for most organisations and officials and tweets are often linked to
as a primary source. Unfortunately, since a few years back, when pressing a
link to a tweet without JS you only get
> JavaScript is not available.
>
> We’ve detected that JavaScript is disabled in this browser. Please enable
> JavaScript or switch to a supported browser to continue using
> twitter.com. You can see a list of supported browsers in our Help Center.
And after scrambling for a web browser capable of reading a tweet you are
sometimes met with a login screen and are asked to create an account to
continue.
- youtube.com
[YouTube](https://youtube.com) currently has more or less monopoly on
online video hosting, it is pretty much an unavoidable part of today's web.
Trying to load any page without JS presents only a white page with empty
placeholders.
You could argue that YouTube's main purpose is to show videos, and it is
hard to implement a good video player without JS. However, just a few years
ago, you were able to use most other parts of the website without JS. You
could still use the search and list the videos of YouTube channels, and
from there just open them in an external player. This does not work
anymore, and you have to resort to an external search engine.
- Gitlab
GitLab is a source forge for hosting and discussing software projects.
Unfortunately, it is not possible to read about projects, follow
discussions or read wiki pages without JS. Loading a project page, e.g.
[postmarketOS](https://gitlab.com/postmarketOS/pmbootstrap), simply shows a
blank page and an empty header.
- imgur.com
Imgur is an image hosting website that gained popularity from links from
reddit. Its primary use is to host and show images but it has since a few
years chosen to cripple this functionality. You are no longer able to view
an image without JS, and if you enable JS you no longer only see the image
you are interested in, but you are also shown other random images in full
size. This has obviously been done for monetary reasons, simply hosting
images for free is hard to make profitable, but it is unfortunate
nonetheless.
- crates.io
[Crates.io](https://crates.io) is the main and more or less only repository
for libraries or "crates" for the Rust programming language. The primary
purpose of its website is to show information about the crates hosted
there. When entering the website without JS your are greeted with
> For full functionality of this site it is necessary to enable JavaScript.
Here, "full functionality" seems to refer to any functionality beyond
showing this text.
This also has the side effect of making crates on crates.io inaccessible
via a search engine. Instead, you are forced first go to crates.io, make
sure JS is enabled, and then search for your crate there.
These problems seems to be shared by many websites that choose to use some
kind of single-page application framework.
This is, unfortunately, far from a complete list of web pages with this
behavior.
## Mostly unusable
Some websites still at least render _something_ without JS but may fail to
provide their main content. For example:
- reddit.com
Many software projects have communities on reddit, e.g.
[Linux](https://www.reddit.com/r/linux/), and web searches about specific
technical topics sometimes lead to threads on reddit. Unfortunately, since
a few years back, comments in threads are no longer readable at all without
JS. Although, the old.reddit.com domain is still available for now and
using the old interface which works fine without JS. Unfortunately, links
rarely point to that domain.
- github.com
Github is currently by far the largest host of software projects. If you
encounter a link to a project, it is most likely a link to a GitHub page.
GitHub still mostly works without JS but is losing functionality. It is no
longer possible to browse a source tree at all, for example that of the
[Linux kernel](https://github.com/torvalds/linux). You cannot enter
directories and you cannot open any source files to read the source code.
Neither can you get the git clone URL for SSH.
Luckily, you are still able to read the README, issues, merge requests and
wiki pages.
- smhi.se
SMHI is the Swedish Meterological and Hydrological Institute and their
website is primarily used to read weather forecasts of the nearby region.
The website's [about page](https://www.smhi.se/om-webbplatsen) states the
following about JavaScript (translated to English):
> The website contains a few javascripts. They are for example used for
> presentation of maps in some of our weather and water services. None of
> these functions are critical for the website to function correctly.
This sounds promising. Unfortunately, when pressing the "Weather" button,
nothing happens. Actually, nothing happens when pressing any of the main
category buttons. Relying on JS to implement navigation elements seems to
be increasingly common in general.
Accessing a direct link to a forecast, for e.g. [Stockholm][smhi-sthlm]
just shows nothing where the table of temperatures is supposed to be and
there is no warning that JS is required.
On the other hand, the Norwegian counterpart is very functional without JS:
[yr.no](https://yr.no). They do have a friendly banner stating that not all
features are available but pretty much everything except for the
interactive map seems to work. It seems a lot snappier as well. Luckily,
they have accurate forecasts for Sweden as well, e.g.
[Stockholm][yr-sthlm].
[smhi-sthlm]: https://www.smhi.se/vader/prognoser/ortsprognoser/q/Stockholm/2673730
[yr-sthlm]: https://www.yr.no/nb/v%C3%A6rvarsel/daglig-tabell/2-2673730/Sweden/Stockholm/Stockholm%20Municipality/Stockholm>
## Common annoyances
Besides failing to provide the main content or render anything at all, there
are many other common annoyances when disabling JS.
### Redirects
Some websites choose to perform a redirect to a "nojs" page whenever a page is
accessed without JS. One example is the [login
page](https://login.microsoft.com) for any of Microsoft's websites. Nowadays
you often can't access your work or student email without using this specific
page. A redirect is annoying because it prevents you from accessing the page
after you actually have decided to enable JS. The web browser does not store
the original address for redirects so the back button will not take you back
there.
### Non-removable popups
A lot of websites have annoying pop-ups that try to trick you into consenting
for tracking cookies for advertising purposes. Some of these are impossible to
close without JS. One offender of this was [Stack
Overflow](https://stackoverflow.com) previously. On desktop, it was a square in
the lower left corner, but on mobile it covered around three thirds of the
screen, giving you just a narrow window to read the actual content. Stack
Overflow shows up on pretty much any search about any programming language or
CLI command so this was quite annoying. Luckily, this has now been fixed such
that you do not get the banner at all without JS. So now you are offered a
better experience with JS disabled.
### No images
For some reason, it seems to be quite common for news article websites to
require JS just to load images. Some examples from various articles posted on
HN recently include
- [Atlas Obscura](https://www.atlasobscura.com/articles/the-secret-liquor-recipes-of-rajasthans-royals),
- [IEEE Spectrum](https://spectrum.ieee.org/bob-kahn-2667754905),
- [CNBC](https://www.cnbc.com/2024/04/22/century-old-inventor-of-air-conditioner-is-moving-on-to-home-heat-pump.html).
Interestingly, images work fine for some of these when using reader mode.
### Reduced content
Another common problem for news article websites is that some have chosen to
fetch the majority of the article content using JS, showing you only a small
part of the beginning of the article when loading without JS. This is
presumably done to implement some form of paywall. Some examples of various
articles posted on HN recently include
- [New Your Times](https://www.nytimes.com/2024/04/22/technology/generative-ai-gene-editing-crispr.html),
- [Bloomberg](https://www.bloomberg.com/news/articles/2024-04-15/amazon-electric-vans-powered-by-17-000-ev-chargers),
- [Gizmodo](https://gizmodo.com/lawmakers-are-kicking-warrantless-wiretapping-into-over-1851417659).
Besides those, there are countless other annoyances, e.g. broken layouts,
broken icons and many more.
## Justified usage
Fortunately, there are also websites that utilize JavaScript only to improve
the user experience.
A good example of this is [Wikipedia](https://wikipedia.org) and other
MediaWiki websites. At least for reading, Wikipedia is fully functional without
JS and JS is only used to e.g. show previews of footnotes and links.
Some websites use JavaScript to compensate for the lack of a server backend.
This allows you to make the website completely static but still provide
functionality that is typically performed by a backend -- search for example,
which is very useful. This is done by e.g.
- [docs.rs](https://doc.rust-lang.org/std/index.html),
- [mdbook](https://doc.rust-lang.org/stable/book/),
- [The Reclaimers Library](https://c20.reclaimers.net).
There are also some websites that rightfully require JavaScript to function at
all, for example
- [OpenStreetMap](https://www.openstreetmap.org),
- [Monkeytype](https://monkeytype.com/).
because the main functionality of these are impossible to achieve without JS.
## Without JavaScript
Also, there are still plenty of websites that work very well without
JavaScript. Most websites that only serve static content are still very usable,
e.g. software documentation and web blogs.
Many forums also still work very well, e.g.
- FluxBB, e.g. ,
- phpBB, e.g. ,
- [Hacker News](https://news.ycombinator.com).
Some source hosting alternatives are a lot better than GitLab and GitHub with
JS disabled:
- [Sourcehut](https://sourcehut.org/), e.g.
,
- [cgit](https://git.zx2c4.com/cgit/),
- [Gitea](https://about.gitea.com/), e.g. .
There are also websites that provide alternative versions of the main site that
are designed to fully work without JS, e.g.
- ,
- .
These are especially nice when using a console web browser.
## Conclusion
In summary, refraining from unconditionally running any code served by any
websites you visit can be quite a cumbersome experience today. And to me it
seems like the it has steadily been getting worse for a while. More and more
websites choose to unnecessarily require JavaScript to serve basic content.
However, looking back more than a decade, I would still say the current
situation is a lot better than when a lot of functionality was implemented with
Adobe Flash, Microsoft Silverlight and Java applets.
Also, most websites with actual content that I am interested in work very well
without JavaScript. And many good websites utilize JavaScript very well to only
provide useful functionality.