3 ms·
> Static website can be served by `cat index.html` For sure, but that's not a sufficient definition. You need to add some constraints to the contents of the h
by enriquto 2y ago
> Static website can be served by `cat index.html`
For sure, but that's not a sufficient definition. You need to add some constraints to the contents of the html. Otherwise, you can put a huge javascript program in there that hallucinates a new page each time you render it. This shouldn't count as "static".
- oneeyedpigeon 2y ago> This shouldn't count as "static". Why not? If it doesn't, where do you draw the line, apart from "absolutely no javascript at all"?
- enriquto 2y agoThat's a good line to draw! Static = no scripting (either server-side or client-side)
- oneeyedpigeon 2y agoI'd like to reserve the term "no scripting" for that :) I guess if we popularise the term "no backend", the two could co-exist. I want to talk about sites that are just a collection of flat files, with no server-side processing; for me, "static" does that job perfectly.
- Ferret7446 2y agoIt generally does count as static though. In this context static has a technical meaning, not the dictionary definition. It's static from the server side, meaning that you don't need any special logic to serve it.
- bccdee 2y agoThat is static though. It may not conform to a particular notion of aesthetic purity, but a website is static if and only if you can serve it from a static file server. Client-side scripting is orthogonal to that.