Predict HTTPS Behavior
Predict Output Easy
Question
An HTTPS page includes <script src='http://cdn.com/lib.js'></script>. What happens?
Code
<!-- Page is served over HTTPS -->
<script src="http://cdn.com/lib.js"></script>
Hint
This is called 'mixed content'.
Explanation
Browsers block active mixed content — an HTTPS page cannot load HTTP scripts. This is a security measure to prevent man-in-the-middle attacks. The fix is to use https:// in the script URL. Passive mixed content (images) may be loaded with a warning, but active content (scripts, styles) is blocked.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.