4 ms·
I think your definition of a static web page is different from the common one? In my head, a static page is something that's served verbatim, without some back
by matsemann 4y ago
I think your definition of a static web page is different from the common one?
In my head, a static page is something that's served verbatim, without some backend generating it or inserting things into a template.
Wikipedia seems to agree with that view: https://en.wikipedia.org/wiki/Static_web_page https://en.wikipedia.org/wiki/Static_web_page
- superkuh 4y agoThat's exactly what I said. It doesn't matter if I wrote the HTML by hand or I had a perl, or bash, or compiled c program make it. It's just an HTML file.
- vore 4y agoYou can put client-side JavaScript fine in “just an HTML file”?
- deleted 4y ago[deleted]
- meghan_rain 4y agoLol no. If you HTML is generated, it's by definition not static anymore. Otherwise, all of the React server side rendering is static HTML.
- superkuh 4y agoOh, so when I make an .html file in Dreamweaver WYSIWYG HTML editor and save the .html file to my websever ~/www/ dir it is automatically not a static page anymore because I used a program to generate it? This is a very wild and weird interpretation of 'static site' that does not fit with existing usage.
- Kiro 4y agoYou are the last person to have a say in that considering your incorrect take that JS can't be static. You're clearly misaligned with common usage of terms.
- superkuh 4y agoWhen javascript started being able to change HTML significantly the result was literally named "Dynamic HTML". So it is clear this is not a static HTML page. The only thing left to argue is weather it is a static web site. People who got into web dev after 2010 will say yes, people who watched HTML/JS evolve over it's lifetime will say no.
- GeneralTspoon 4y agoNo, because React is dynamically generating the HTML on the fly. If you pre-compile the HTML using something like Jekyll, so that the webserver is just serving HTML files without any dynamic/on-the-fly processing at request time, then it's considered static.
- matsemann 4y agoReact server side rendering: most likely dynamic React on the client side: static, as you still got the same files served, how they dynamically alter the page runtime doesn't count.
- SamBam 4y agoThis is the most bizarre argument. Of course you can use build tools to generate static web pages. The issue is whether they are being generated dynamically by a server. This project isn't. You run a build-tool once and then can post the .html page anywhere. It's static.
- shawabawa3 4y agoYou're incorrect CSS and JavaScript and images are also static, it doesn't have to be just HTML If you have a perl or bash or c backend generating html in response to http requests it's not static
- superkuh 4y agoYou're assuming this is a backend. It is not. Do you consider generating an HTML file in a WYSIWYG editor like, say, "Dreamweaver" that outputs an .html no longer static because it was made by a program? That's absurd.
- shawabawa3 4y agoNo, that's static, that's why I said "in response to an http request"
- deleted 4y ago[deleted]
- mytailorisrich 4y agoIt can be html, css, javascript, whatever. 'Static' means it's only made of static files that can be served by just a vanilla Web server (i.e. just by serving static files).
- swatcoder 4y agoHTML includes the content of style and script elements (among many others) and the results of whatever they do. The combination of all of these direct a browser in how to render a page. Traditionally, a static site or static page is one whose data can be delivered to the client directly as stored, with no server-side alterations or generation. This is/was a meaningful distinction because a server that can stream stored data is fundamentally much simpler than one that executes programs. Such a server can run in different contexts, be optimized in different ways, and satisfies constraints that allow further optimizations downstream.