You add “include” tags to your HTML file and your web server like nginx or varnish would replace it with the fragment at runtime.
<!--#include virtual="../footer.html" -->
I saw this was quite popular for big publishing houses with millions of articles still relatively recently 10 years ago. They would only write the HTML body of a new article and the other fragments would be included by the web server.Very cheap, stable, and very big changes across the whole website could be done instantly since cache invalidation is trivial (the web server knows all modified dates of all fragments).
Also, no additional CDN or caching needed. Later, with CDNs there was even a variant where these fragments were hosted at the edge (ESI).
Yesterday. Astro components.
3 million people will have seen it as I type this. More next week.