Nodejs script that changes the tagline of a html page.
Go to file
array-in-a-matrix cee12beb5d update dep 2023-11-29 19:19:01 -05:00
.gitignore moved list of strings to json file + added test html file 2022-06-10 00:34:44 -04:00
LICENSE Initial commit 2022-05-25 18:51:42 -04:00
README.md why? 2022-08-05 18:56:54 -04:00
index.js moved list of strings to json file + added test html file 2022-06-10 00:34:44 -04:00
package.json everything 2022-05-25 22:12:11 -04:00
pnpm-lock.yaml update dep 2023-11-29 19:19:01 -05:00
strings.example.json moved list of strings to json file + added test html file 2022-06-10 00:34:44 -04:00
test.html moved list of strings to json file + added test html file 2022-06-10 00:34:44 -04:00

README.md

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.