K
K
Konstantin2017-03-09 16:29:05
SVG
Konstantin, 2017-03-09 16:29:05

How to fix Unsafe attempt to load URL error when including SVG?

When connecting an SVG sprite, the image does not appear, and the following outputs in the console: "Unsafe attempt to load URL...from frame with URL....'file:' URLs are treated as unique security origins. " . Never encountered this before. How can this be fixed?
I connect the SVG itself inside the document

<svg> 
     <use xlink:href="..img/svg/svg-symbols.svg#instagram"></use>
</svg>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evanre, 2017-08-10
@Evanre

Accessing svg via xlink:href requires HTTP, does not work locally. Unless you embed the svg inline. In other words, you need a server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question