/svg-external-sprite-redownloaded

Illustrative repo demonstrating SVG sprite being always downloaded when DOM is reconstructed

Primary LanguageJavaScript

svg-external-sprite-redownloaded

Illustrative repo demonstrating SVG sprite being always downloaded when DOM is reconstructed.

Usage

  • 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

Chromium

Safari

Firefox

  • sprite.svg only requested once. This is what I would consider to be the expected behaviour.