The reason(s) why I try to avoid using JS is:
Most websites use JS for tracking stuff.
Some websites make it so you cannot see any content unless you have js enabled, which is not correct cause you should be able to choose if you want to be tracked or not.
I have ensured that all website content is viewable, even if you have JS disabled.
JS is bloated and messy in terms of performance and code.
JS is abused more than it should be.
JS can fail because of an online dependency changing its code, or it could fail because of a simple coding mistake. Sometimes when it fails, it can be devastating on a website.
JS requires more maintenance than HTML when new updates come or when you want to add a simple feature compared to HTML.
JS can be dependent on a single URL to a file, and if that file is not hosted by the same company hosting the website, then sometimes, if the JS file goes down, so does the website.
Reasons to use JS.
- You can accomplish the same thing with a bit of code.
JS is used for improving the look of a website and doing things that generally would not be possible with just HTML.
JS is also used for function, so some websites don't allow certain pages to function unless you have JS enabled.
It is possible to accomplish the same task with JS, which would otherwise take more lines of code. When compared with other methods for doing the same thing.
What works, doesn't, and what it might affect.
- Local Storage.
Without JS, you can not save or retrieve LocalStorage, which means you cannot save the state of the chosen color theme. However, you still have the functionality by setting dark mode at the Browser or Operating System level.
- The manage cookie button.
Without JS, you can not see the button, and if you could, you would not be able to open the popup, which means you cannot choose to be tracked.
- The banner to consent to tracking.
Without JS, you can not agree to be tracked.
- The contact form.
The contact form won't work without JS because it uses JS to get around a chromium error, saying it is not secure.