3 ms·
I thought about it. Why do you even need static site generators when all you have to do is throw up a CDN with your dynamic site being the origin server? Same t
by EGreg 5y ago
I thought about it. Why do you even need static site generators when all you have to do is throw up a CDN with your dynamic site being the origin server? Same thing pretty much as the static site generator. You can even "generate" the static pages by visiting them yourself.
Oh yeah, and when something on a page changes, you tell the cache to invalidate some tags.
- cprecioso 5y agoThis is basically what Next.js does https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration https://nextjs.org/docs/basic-features/data-fetching/increme...
- akagusu 5y agoThis is basically what people used to do with server-side frameworks long before the frontend framework SPA/SSG/SSR craziness wiped out people's memories.
- manigandham 5y agoThere is some advantage in security, deployment is easier, performance can be better if page generation is intensive, and backend data stores can be avoided completely. None of these are major reasons though and it’s mostly just popular tech stacks from the rise of javascript frameworks and UI. Most static hosting providers are just a basic file/web server with a CDN in front. It’s especially interesting as they now have come full circle with generate-on-demand pages, which is basically a dynamic backend.
- IshKebab 5y agoBecause then you have to run a dynamic site. Static site hosts are much easier to come by for free.