Skip to content

Kompile Learn

Mixed content: plain HTTP on an HTTPS page

Load every script, stylesheet, image and frame over HTTPS.

What it is

An HTTPS page that pulls a script or stylesheet over plain HTTP is only as secure as that one unencrypted request.

Why it matters

Anyone on the network can replace that file, and a replaced script controls the whole page.

How to fix it

Change the URLs

<script src="https://cdn.example.com/lib.js"></script>

Safety net header

Content-Security-Policy: upgrade-insecure-requests

Does your site have this problem?

Kompile Scan checks for this and the other problems in these guides in under a minute. Free for one site.

Check my site