This commit is contained in:
array-in-a-matrix 2022-08-05 18:56:54 -04:00
parent a7f4b8da22
commit 7e6f48a619

View file

@ -1,3 +1,12 @@
# tagline-changer
Nodejs script that changes the tagline of a html page.
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.