A computer monitor that has a ring going around it ending in a arrow, on the sides of the ring are smaller arrows going in opposite directions of each other with arrows ending them off. Written on the screen is OTG and text under the monitor saying ON THE GO and below that is text saying Technology

Home>Blog>2021 Blog Post(s)>JS

Blog: 3 Date: 2021-03-16

Reasons for not using JavaScript.

The reason(s) why I try to avoid using JS is:

  1. Tracking.
  2. Bloat.
  3. Abused.
  4. Fail.
  5. Maintenance.
  6. Dependencies.

(JS stands for JavaScript)

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.

  1. Looks.
  2. Usability.
  3. 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.

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

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

  1. The banner to consent to tracking.

Without JS, you can not agree to be tracked.

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