Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Dev0ps's avatar

Unsafe attempt to load URL <URL> from frame with URL <URL>. Domains, protocols and ports must match.

All svg are visible in localhost but invisible in server

Unsafe attempt to load URL <URL> from frame with URL <URL>. Domains, protocols and ports must match.

and

svgxuse.js:1 Mixed Content: The page at 'https://www.aaaa.world/home' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.aaaa.world/svg-icons/sprites/icons.svg'. This request has been blocked; the content must be served over HTTPS.
0 likes
3 replies
lostdreamer_nl's avatar

like the error states: You are on a HTTPS website, and trying to load content from HTTP website.

You cannot do that.

You probably have the images as:

<img src="http://www.aaaa.world/svg-icons/sprites/icons.svg">

Either change that to:

<img src="/svg-icons/sprites/icons.svg">
// or
<img src="//www.aaaa.world/svg-icons/sprites/icons.svg">

Both will force the browser to stick to the same (httpS) protocol.

note: On your localhost this is working fine because your localhost is working on HTTP instead of HTTPS

1 like
Dev0ps's avatar

Thanks, Friends I solve it by adding

AddType image/svg+xml .svg .svgz

Please or to participate in this conversation.