Dynamic vs Static Websites? Client vs Server Rendered

Viewed 30

EDIT[ It looks like more what I am describing below is client rendered vs server rendered, I was thinking static and dynamic held a more specific definition other than trivially meaning "same" and "different" respectively. This is what I was looking for and it appears to blur peoples definitions and thus makes static and dynamic more confusing than it needs to be ]

I have done a bit of research but still can't definitively separate dynamic vs static websites with a clear line. And I know this question has been asked a lot, but the line of separation always seemed slightly ambiguous, and minimally defined.

For instance I know I can build a website project maybe with vue and upload that project on to firebase. All the files that are displayed live on that website and you can simply inspect to see it all. I would call this a static website, even if I have api's that call on dynamic content such as logging in and displaying a username or asking for an array of products to show in a shopping cart.

Sort of like a webapp on android or iOS, its all bundled up, but apis can call on content which is shown dynamically...

I consider a dynamic website such as one where the server side handles the routing. For example, I may build with the node environment and put up on google cloud with app engine. I then build pages and serve them up through api calls. The url link is essentially an api call which I then use express to send the html, css, and javascript. Of course I can statically send all the css and javascript, and dynamically send the html. But this is what I consider to be a dynamic website.

So lets say I make a static website, but the html is just a skeleton awaiting for the client side javascript to pull in objects, strings, links to images, and etc... to pages from a separate server. I would consider this still static since I am not sending over any html file, I am only sending content to fill the already existing html.

In the end, I say a static website is one where all files are present on the client side and so routing is handled client side even if there are api calls that return dynamic content. While a dynamic website is one in which its html files are sent to the client with different url calls and thus the routing to pages are handled on the server side.

What is the true definition of static and dynamic websites in the programming world? And how does it hold up to what I think above?

1 Answers

Static websites will remain same from every user. whereas Dynamic website can display different content for different user like language, currency, photo, products, website interaction etc.

Related