---
title: "Load nothing over plain HTTP · Agent Wranglers"
url: https://agentwranglers.se/playbook/application-security/browser-security-headers/mixed-content
id: APS-24
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 670
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Load nothing over plain HTTP

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: APS-24
- Level: Recommended
- Chapter: [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md)
- Rule: Load every file over HTTPS. Add `upgrade-insecure-requests` as a safety net.
- Check: `grep -rnE '(src|href|action|srcset)="http://' dist/` finds nothing in the built pages. The browser console shows no mixed-content warnings.
- How: Use root-relative or `https://` addresses for every file. Add `upgrade-insecure-requests` to the CSP on HTTPS. The [Encrypt data on the wire and on disk](https://agentwranglers.se/playbook/application-security/cryptography-and-keys/encrypt-data.md) rule covers connections between your own servers.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### HTML example

```html
<!-- Good: root-relative or https -->
<img src="/logo.svg" alt="Example">
<script src="https://cdn.example.com/app.js"></script>
<!-- Bad: plain http on an https page -->
<img src="http://example.com/logo.svg" alt="Example">
```

## Sources

- [W3C Mixed Content](https://www.w3.org/TR/mixed-content/)
- [W3C Upgrade Insecure Requests](https://www.w3.org/TR/upgrade-insecure-requests/)

## Related rules

- APS-54 [Encrypt data on the wire and on disk](https://agentwranglers.se/playbook/application-security/cryptography-and-keys/encrypt-data.md) in Application security

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/application-security/browser-security-headers/mixed-content">Agent Wranglers application security playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Make browsers always use HTTPS](https://agentwranglers.se/playbook/application-security/browser-security-headers/hsts.md)
- Next: [Allow only the scripts you wrote](https://agentwranglers.se/playbook/application-security/browser-security-headers/content-security-policy.md)
- [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md)
