Illustrative repo demonstrating SVG sprite being always downloaded when DOM is reconstructed.
- Run any kind of server to staticly serve assets, such as
npx serve
- Hit browser, and watch network console
- Browsers will re-request the
sprite.svg
over the network every single time the DOM is reconstructed, each second - The pngs on the other hand get downloaded once (or sometimes twice?), and never again
sprite.svg
can be seen to be requested every second, despite already been downloaded, and one version still present on the page- https://bugs.chromium.org/p/chromium/issues/detail?id=1306881
- Same as Chromium
- https://bugs.webkit.org/show_bug.cgi?id=237968
sprite.svg
only requested once. This is what I would consider to be the expected behaviour.