Re:Ask HN: Why does the modern web hate users?
by hammyhavoc on Wednesday January 26, 2022 @08:17AM
(#30085031)
It's simple: websites aren't static like they used to be. CMS query a database for each page load, which is inefficient as hell for serving up what's essentially just an article with no interactive elements, hence the use of static site generators on top of a CMS, or CloudFlare Pages, or GitHub Pages.
Re:Ask HN: Why does the modern web hate users?
by zozbot234 on Wednesday January 26, 2022 @09:59AM
(#30086247)
You solve this by putting a static cache in front of your CMS. It's a very common web architecture. No need to offload anything to the client.
Re:Ask HN: Why does the modern web hate users?
by scarface74 on Wednesday January 26, 2022 @10:17AM
(#30086497)
When were websites that did anything, ever “static”? I was creating websites that had to read from a database in 2001.
Re:Ask HN: Why does the modern web hate users?
by hammyhavoc on Wednesday January 26, 2022 @10:27AM
(#30086623)
This is the point: the overwhelming majority of websites, especially blogs, articles, and general information such as store info, services, portfolio, opening times et al, could all be static instead of running a database query on every page load.
Caching on CMS like WordPress via plugins helps, but they still query a database on each page load. Ergo, the rise in popularity of static site generators even on top of WordPress. Not everything needs to read from a database for every page load.
tl;dr, not all websites need to "do" anything other than serve static information, but the way in which websites are commonly created and served is piss-poor. Just because the served content is static files doesn't mean that a CMS can't generate it if users want a graphical editor in their browser, and still want their theme of choice.
Edit: Ugh, yes, I know network is part of the equation. Parent specifically called out client-side rendering though and that's what I'm responding to.