https://github.com/cherry/svg-external-sprite-redownloaded
Illustrative repo demonstrating SVG sprite being always downloaded when DOM is reconstructed
https://github.com/cherry/svg-external-sprite-redownloaded
Last synced: about 1 year ago
JSON representation
Illustrative repo demonstrating SVG sprite being always downloaded when DOM is reconstructed
- Host: GitHub
- URL: https://github.com/cherry/svg-external-sprite-redownloaded
- Owner: Cherry
- Created: 2022-03-16T16:33:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-16T18:37:12.000Z (over 4 years ago)
- Last Synced: 2025-01-30T03:28:00.002Z (over 1 year ago)
- Language: JavaScript
- Size: 586 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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

- `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
### Safari

- Same as Chromium
- https://bugs.webkit.org/show_bug.cgi?id=237968
### Firefox

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