Illustrative repo demonstrating Chromium caches SVG files referenced externally from <use> tags, even when caching is disabled both client and server-side.
- docker
-
Use the
npxscript to start the server in a new docker container../npx -y http-server -c-1 -
Notice
Cache: -1 secondsin the terminal output (meaning, the http server has disabled caching). -
Open an incognito tab in Chromium.
-
Press F12 to open the dev console.
-
Click on the Network tab and select 'Disable cache'.
-
Visit
http://localhost:8080/. -
Notice the request for
circles-no-cache.svgin the dev console Network tab. -
Right-click on the reload icon.
-
Select 'Empty Cache and Hard Reload' from the dropdown list.
-
Notice the absence of a request for
circles-no-cache.svgin the dev console but the green circle is still visible on the page.
This demonstrates the image is being cached although it shouldn't be.
Chromium Version 125.0.6422.76 (Official Build) built on Debian 12.5, running on Debian 12.5 (64-bit)


