4 ms·
Same here... and I wouldn't call this a static page anymore if it runs JS on load, calls a HTTP endpoint which makes DB query which returns HTML that modifies t
by cirrus3 4y ago
Same here... and I wouldn't call this a static page anymore if it runs JS on load, calls a HTTP endpoint which makes DB query which returns HTML that modifies the DOM.
- dylan604 4y agobut if you can host your site from an S3 bucket, would it not be called static? to me, static means no server side languages necessary to render the page. if your statically served JS can call a remote host to pull down some data that updates things client side, it's still considered static, from a hosting perspective.
- codeflo 4y agoWouldn’t that definition would apply to standard SPAs as well?
- dylan604 4y agoI guess it depends on perspective. What a host service that will charge you more money for a non-static site, a client-side JS app can still be considered static. We might also be blurring lines of static sites vs interactive sites. You can have a static site that does nothing but allows the user to scroll to view it. You can also have static sites that change and do things based on the user's input. Entire games have been made using client-side JS but is still served statically.
- zamadatix 4y agoIMO if a web user triggered event triggers a server side page regeneration they see when the page reloads what you have is more a dynamic site with caching not a static site. "It's a write-to-file-before-serving site" isn't really a meaningful distinguisher but "the site functions the same when you only have a copy of the website files" is.
- layer8 4y agoThe JS doesn’t trigger a DB query, it loads a static comments file previously generated by Ruby at the time the last comment was inserted or modified. It could be replaced by a server-side include.
- nigamanth 4y agoYep, it's not static because data in the DB is changing the file.