tagline-changer/README.md
array-in-a-matrix 7e6f48a619 why?
2022-08-05 18:56:54 -04:00

741 B

tagline-changer

A Node.JS script that changes the contents of a tag in a .html page.

Why not just use front-end JavaScript?

There is two ways to implement this on the client side:

  • Sending the .JSON file to the browser which would significantly increase the load time and packet size.
  • Having client side JavaScript send a HTTP GET request which would also increase load time and increase amount of requests.

Having a server side script change the .html file directly makes the browser only need the request the .html and .css for the page and nothing else. Doing things this way not only makes the page load way quicker but also supports browsers that limit or straight up block JavaScript and shrinks attack surface.