3 ms·
I don't think the dichotomy of static vs. dynamic is that useful really. At least not if they are taken to mean pre-compiled vs. generated directly as a respons
by troels 13y ago
I don't think the dichotomy of static vs. dynamic is that useful really. At least not if they are taken to mean pre-compiled vs. generated directly as a response to a http request. The so-called static pages are presumably still assembled by some programmatic pipeline (aka "dynamic").
What does matter, is that pages that are the same for all users, and that change rarely are served with proper caching headers. That way you can drop a http-cache in front of your app and voila, you have all the same benefits that a pre-compiled site would give you, but without the pain of having to use a completely separate process.
The hard part is separating elements that have different frequencies of change from each other. For some reason, this is not something that popular web frameworks (Such as Rails) push very hard, but it's something I find extremely useful when building web apps. A classic trick is putting user-specific information (Such as your name + karma score in the top right corner of this site) in a separate ajax-call, while the main page is served with hard public-cache headers.