Nodejs script that changes the tagline of a html page.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
array-in-a-matrix 7e6f48a619 why? 4 months ago
.gitignore moved list of strings to json file + added test html file 6 months ago
LICENSE Initial commit 7 months ago
README.md why? 4 months ago
index.js moved list of strings to json file + added test html file 6 months ago
package.json everything 7 months ago
pnpm-lock.yaml everything 7 months ago
strings.example.json moved list of strings to json file + added test html file 6 months ago
test.html moved list of strings to json file + added test html file 6 months ago

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.