3 ms·
We had this 25 years ago in the form of "Server Side Includes". https://en.wikipedia.org/wiki/Server_Side_Includes https://en.wikipedia.org/wiki/Server_Side_In
by recursive 2y ago
We had this 25 years ago in the form of "Server Side Includes". https://en.wikipedia.org/wiki/Server_Side_Includes https://en.wikipedia.org/wiki/Server_Side_Includes
You could put something like this in your markup
<!--#include file="footer.html" -->
And the web server would apply it and inline the contents. It had a bunch of other directives, but this was the good one.
- spankalee 2y agoA server side include wouldn't fix this problem because the SVG would be inlined everywhere. That defeats caching by duplicating the content.
- Izkata 2y agoIf we're talking just SVG, it could be done as a one-time inlining that uses <defs> to define shapes, that get pulled into the page later with <use>. The defs are page-wide and work across <svg> elements. That would fix the duplication, though not necessarily caching on its own with GP's include. https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs https://developer.mozilla.org/en-US/docs/Web/SVG/Element/def...