this post was submitted on 31 Aug 2024
170 points (98.9% liked)

Open Source

31713 readers
113 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] RobotToaster@mander.xyz 15 points 3 months ago* (last edited 3 months ago) (6 children)

Static

Javascript

Has someone changed the meaning of static? I've always thought it meant the opposite of Dynamic HTML

[–] SzethFriendOfNimi@lemmy.world 42 points 3 months ago

Static files as in static file handling in a web server no CGI, modules, server side code required.

[–] karmiclychee@sh.itjust.works 14 points 3 months ago

Served as "flat files" - filesystem, object store, what have you. No server logic generating content, just passing around of strings and binary data. Files are the representation are the source of truth. Counter to a web app, where the content response is ephemeral and the "source of truth" is scattered across a writeable DB and recombinated (potentially) on every request.

Interesting question though, I (a web dev) just take the term for granted.

[–] thingsiplay@beehaw.org 11 points 3 months ago

It depends what static refers to. In this case, it refers to static file creation without PHP (or Python) on the server. The content itself can stay static, JavaScript and its dynamic nature is just used to encrypt and decrypt.

[–] anzo@programming.dev 6 points 3 months ago

It's been always the same. Backend, server logic, database... dynamic content; on one hand. JavaScript runs on the browser for almost anything, sometimes for dynamic content. But it's not tied. You could have an in-browser button with a counter for the numbers of times it was pressed (that's actually an entry-level programmer exercise) and that's a static site. If you saved the counter value to the server (e.g. database) then it's not static anymore.

[–] delirious_owl@discuss.online 5 points 3 months ago

No, static sites are usually more js heavy because they offset all the processing to the client.

This is one reason I avoid static sites, and just heavily cache the server.

[–] ReversalHatchery@beehaw.org 3 points 3 months ago

I think they mean taking a static site, and encrypting that with an attached JS. It could be done with a browser extension too (probably), but that way it would be less portable