4 ms·
A server side include wouldn't fix this problem because the SVG would be inlined everywhere. That defeats caching by duplicating the content.
by spankalee 2y ago
A 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...