Chrome embedding SVG results in infinite requests

47 Views Asked by At

I'm migrating from self serving SVGs in my app to storing them out on Azure as a blob. Doing the following when the URL is being served by the app works fine:

<embed src="@Model.SensitivityUrl" type="image/svg+xml" class="svgcontainer" />

However, doing the same thing when the URL points at the azure blob makes the initial request fine: enter image description here Then Chrome starts making request after request for the same URL, all served by the cache, continuing until I either leave the page, or in this case, since I wanted to keep the logs, delete the element from the page: enter image description here

Some further experimentation shows that this isn't an Azure issue, as embedding a SVG from wikimedia results in the same behavior:

<embed type="image/svg+xml" src="https://upload.wikimedia.org/wikipedia/commons/6/67/Firefox_Logo%2C_2017.svg" class="svgcontainer" />

And this seems to be Chrome specific, the exact same page, with the same embed pointing at wikimedia works fine.

So, in short, has anyone else run into issues using <embed> to put an SVG into a page in Chrome, when the SVG is hosted on another domain?

0

There are 0 best solutions below