epicweb-dev / epic-stack

This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea.
https://www.epicweb.dev/epic-stack
MIT License
4.32k stars 355 forks source link

Safari loads svg sprite twice #788

Closed kdubrovsky closed 2 months ago

kdubrovsky commented 2 months ago

There is an issue with Safari and svg sprite preloading.

I made a build and ran it in Safari and Chrome to check Network waterfall and was a bit surprised with Safari caching strategy (no svg cache!). Chrome gets svg once, but Safari does it twice!

Look like Safari thinks that http://localhost:3000/assets/sprite-CLS3HeIT.svg in not the same resource as http://localhost:3000/assets/sprite-CLS3HeIT.svg#Actions/16/sale!

Then ironically, but every browser shouts: "The resource http://localhost:3000/assets/sprite-CLS3HeIT.svg was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally"

Screenshot_2024-07-01_at_12 02 47 Screenshot_2024-07-01_at_12 06 00