Created attachment 454850 [details] Zip of files in the referenced github repo When manually constructing an SVG via JavaScript that uses an external stylesheet via `<use>`, no matter if the sprite is already rendered on the page, or if it's been downloaded before, it is always fetched over the network. This can lead to an excessive number of requests on pages that use JS to construct and deconstruct tooltips, menus, etc. Replication: - Clone https://github.com/Cherry/svg-external-sprite-redownloaded (also attached as zip to this ticket) - Run any server to serve this directory (npx serve for example) - Open resulting site, and watch network requests as both a PNG and SVG element are constructed and deconstructed every second Expected Results: `sprite.svg` to be only downloaded once Actual Results: `sprite.svg` is downloaded every second The replication was done using Safari 15.4 (17613.1.17.1.6) on MacOS 12.3. I did not test with iOS, but it's possible that's also impacted. I'm not sure if this is expected behaviour, but I did find a previous bug reporting similar things in the past: - https://www.smashingmagazine.com/2016/05/safari-svg-sprite-bug/ - https://bugs.webkit.org/show_bug.cgi?id=156368
<rdar://problem/90638004>
Thanks for filing, This does not reproduce for me on Safari Technology Preview Release 142 (Safari 15.4, WebKit 17614.1.5.16). Each icon is only fetched once. Are you still able to reproduce this on that build?
Thanks for the update, and my apologies for the delay in response on my end. I'm no longer able to replicate this on the latest Technology Preview release.
The file confirmed that they are not able to reproduce this bug on STP as well. Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!
(In reply to Ahmad Saleem from comment #4) > The file confirmed that they are not able to reproduce this bug on STP as > well. > > Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks! *Filer / Reporter