I've become a fan of https://htmx.org for this reason.
A small 10KB lib that augments HTML with the essential good stuff (like dynamic imports of static HTML)
The minified version needs ~51 kilobytes (16 compressed):
$ curl --location --silent "https://unpkg.com/[email protected]" | wc -c
50917
$ curl --location --silent "https://unpkg.com/[email protected]" | gzip --best --stdout | wc -c
16314
Seems like overkill to bring in a framework just for inlining some static html. If that's all you're doing, a self-replacing script tag is neat:
... The `script` element is replaced with the html from `/footer.html`.