building awe.

A clean Incognito window doesn't clear your server of Chrome's Not Secure warning

Chrome flagged my new domain Not Secure; Incognito showed it clean. The likely cause was an extension injecting code. Here's how to prove whose bug it is.

Chad Priest / / 12 min read

On the morning of 2026-10-11 I opened awe.run in Chrome and the address bar said Not secure.

The domain was days old. That meant new DNS, new certificates and new reverse proxy config, all set up fast and all on my list of things that could be wrong. So I believed Chrome. I assumed I had shipped a TLS mistake or an http:// asset somewhere in the new pages.

Then I opened the same URL on the same machine in an Incognito window, and it showed as secure. Nothing had been deployed in between. I decided the server was fine and the culprit was an extension in my everyday profile, wrote that down as a gotcha, and moved on.

That conclusion went further than the evidence. This post covers what the test actually showed, what it didn’t, and the checks that would have closed the gap.

No screenshot, no Chrome version, no Initiator value from the incident

There’s not much. I didn’t take a screenshot of the chip, I didn’t write down the Chrome version, and I never opened DevTools in the affected profile, so I have no blocked URL, no Initiator value and no console line from the incident. All I have is one line in my notes for that day: the warning appeared in the normal Chrome profile and not in Incognito, and the most likely cause was a job-application helper extension, because it injects code into pages.

“Most likely” is carrying a lot in that sentence. I didn’t trace a single request back to an extension ID. Anything below that names the extension as the cause is a hypothesis.

What Incognito actually rules out

My first list of suspects was all server-side: a bad certificate chain on the new domain, a redirect that went through plain HTTP, an image or font hardcoded to http:// in the new pages. Incognito clears part of that list. A fresh window gets a fresh TLS handshake, so a certificate problem would have shown up there too.

It doesn’t clear the rest. I said Incognito proved the server sent identical bytes to both windows. It didn’t, because I never compared them. Incognito turns off extensions by default, but it also starts without the profile’s:

  • cookies, so a logged-in or cookie-dependent response could have been different HTML, with an http:// avatar or form action the logged-out page doesn’t have;
  • HTTP cache, so the everyday profile could have been rendering an older copy of a page I had since fixed;
  • cached redirects, which matters on a domain whose redirects changed that same week;
  • service workers, which can keep serving old responses after the server has changed;
  • stored HSTS state for the domain.

During a week when DNS, redirects and pages all changed, a stale cached page or an old redirect is as likely as an extension. A clean Incognito window told me the problem was somewhere in the everyday profile’s state. It didn’t tell me which part, and it didn’t clear the server for logged-in users.

Separate the variables in the profile that shows the warning

These checks run in the profile with the warning, in this order, so that each one changes a single thing.

A. Same profile, extensions off. Open chrome://extensions and turn every extension off. Keep cookies, cache and service workers as they are. Reload the page.

  • Clean now: it’s an extension. Turn them back on one at a time until the warning comes back.
  • Still Not secure: it isn’t an extension. Go to B.

B. Same profile, this one origin’s site data cleared. In DevTools, open Application → Storage → Clear site data. That removes cookies, cache storage and service workers for this origin. Then hard-reload with DevTools open and Disable cache checked. To rule out stale HSTS as well, use the Delete domain security policies box at chrome://net-internals/#hsts for the domain.

  • Clean now: you were looking at stale state, such as an old page, redirect or worker. That state came from your server at some point, so check what you used to serve.
  • Still Not secure, with extensions off and site data cleared: it’s your current server, probably on a path that depends on cookies. Log in again and keep going with C.

C. Ask who started the request. Open DevTools → Network, reload, and type mixed-content:all in the filter box. Right-click the column headers and turn on Initiator. Check the Console for Mixed Content: lines too, because a request Chrome blocks or upgrades may only show up there.

  • An initiator like chrome-extension://<32-letter id>/content.js points at that extension. Paste the ID into the search box at chrome://extensions to get its name.
  • An initiator that is one of your own scripts means the bug is yours.

If the profile belongs to a customer and you can’t sit at their machine, ask them for A first. Turning extensions off is one page and two clicks for them, and it answers the most common question.

I should have run A and C that morning. Together they take two minutes.

Untested: does injected content flip the chip?

The extension theory rests on one claim: when a content script adds <img>, <iframe> or <script> elements with http:// URLs, Chrome counts those loads against the page’s security state. Both Stack Overflow threads below say they saw this happen. I haven’t tested it, and I’m not going to state it as fact without a version number next to it. It’s also not obvious ahead of time, because current Chrome automatically upgrades some passive mixed content such as images to HTTPS. An injected http:// image may not flip the chip at all, while an injected iframe or script may get blocked.

Before you tell a customer it’s their toolbar, run this. It’s a minimal unpacked extension:

// manifest.json
{
  "manifest_version": 3,
  "name": "mixed-content-probe",
  "version": "1",
  "content_scripts": [{ "matches": ["https://*/*"], "js": ["probe.js"] }]
}
// probe.js: one of each kind, so you can see which ones count
for (const [tag, attr] of [['img', 'src'], ['iframe', 'src'], ['script', 'src']]) {
  const el = document.createElement(tag);
  el[attr] = 'http://example.com/probe';
  document.documentElement.appendChild(el);
}

Load it at chrome://extensions → Developer mode → Load unpacked, open an HTTPS page you know is clean, and write down three things: the version from chrome://version, what the chip says, and whether the Network tab’s Initiator column shows the chrome-extension:// URL. Then delete one element at a time from probe.js to find out which kinds count. Whatever you see is the actual answer for your users’ browser, and it’s more reliable than my notes or anyone’s forum reply.

web.dev says fix your source. That assumes the source is the cause.

The standard advice is good. It’s written for the case where you shipped the URL.

Google’s web.dev guide Fixing mixed content says: “If you find warnings like these for http:// URLs on your site, you need to fix them in your site’s source.” That’s right whenever the URL came from your source, and you shouldn’t assume it didn’t until checks A and B say so.

How to Fix the “Not Secure” Warning in Chrome gets one thing right: “applying the wrong one … wastes hours,” and you should diagnose before you fix. Its diagnostics, openssl s_client and the Security panel, check the connection. They don’t check what ended up in the page or where it came from.

How HTTP Works recommends Content-Security-Policy: upgrade-insecure-requests as a safety net. That’s a reasonable header to ship, but it works against diagnosis: if it upgrades the request, you’ve hidden the symptom and learned nothing about its source.

The closest thing to my case was an eight-year-old reply on Stack Overflow question 45822492, about a mixed content warning that only showed up on reload: “You may have a plugin/extension on Chrome that injects http links and messes with the overall result regarding mixed content. To check this you can go to the network tab in developer tools and search links that start with http://.” The asker on this Chromium question ended up in the same place: “My problem was caused by a Chromium extension. I disabled it. The error disappeared.” Both are user reports from years ago, so treat them as leads.

The page that gets graded isn’t the page you served

The general shape, which doesn’t depend on my incident being an extension: a browser trust signal is computed over the page as the user’s browser assembled it. That includes their cookies, their cache, their service workers and any code their extensions add. The site owner gets blamed for all of it. A clean dev profile reproduces none of it.

Where the same shape shows up:

  • A site with correct TLS termination behind Caddy or nginx gets a support ticket with a “Not secure” screenshot, and the team spends an afternoon auditing certificates for a problem that’s in one customer’s browser state.
  • Console errors in a user’s bug report blame your bundle, but the stack frames point at chrome-extension:// URLs.
  • Browser automation that drives a real user profile instead of a fresh one inherits that profile’s extensions and cache, so the pages it sees aren’t the pages you tested.

Here is the invariant, narrowed to what the checks below can actually show:

If the bytes your server sends reference no http: or ws: subresource, and a profile with no extensions and an empty cache loads the page with zero insecure requests, both logged out and logged in as a real user, then a mixed-content warning a user sees comes from state on their machine: an extension, a stale cache or service worker, or an old redirect. Checks A to C above tell you which.

If you only run the logged-out half, the invariant covers only unauthenticated pages. An http:// avatar that only renders after login passes the logged-out checks and still fails for every signed-in user.

The check on your own site

1. Grep what you actually serve. This is a first-pass filter. Run it against the response and the files the response links to, not against the repo.

SITE=https://your.site
curl -s "$SITE/" -o page.html
grep -oE '(http|ws)://[^"'\''<> )]+' page.html | sort -u

# every stylesheet and script the page links
for a in $(grep -oE '(src|href)=["'\'']?[^"'\'' >]+\.(css|js)' page.html \
           | sed -E 's/^(src|href)=["'\'']?//' | sort -u); do
  case "$a" in
    http*) u="$a" ;;  //*) u="https:$a" ;;  /*) u="$SITE$a" ;;  *) u="$SITE/$a" ;;
  esac
  curl -s "$u" | grep -oE '(http|ws)://[^"'\''<> )]+' | sed "s|^|$a: |"
done | sort -u

This catches every quote style plus srcset, CSS url(), inline <style> and URLs inside JS bundles. You’ll also get noise like http://www.w3.org/2000/svg namespaces, which aren’t requests, so skim past those. What it can’t catch: URLs built at runtime, stylesheets pulled in by @import, anything behind a login, and anything loaded by code that runs after the first response. A quiet result means you’ve passed the first filter. Step 2 is the real test.

2. Load the page in a profile with no extensions and record every insecure signal.

// insecure.mjs   usage: node insecure.mjs https://your.site/ [auth.json]
import { chromium } from 'playwright';

const [url, state] = process.argv.slice(2);
const browser = await chromium.launch();               // no extensions, empty cache
const context = await browser.newContext(state ? { storageState: state } : {});
const page = await context.newPage();
const hits = [];
const insecure = u => /^(http|ws):/.test(u);

// left the browser as http/ws
page.on('request', r => { if (insecure(r.url())) hits.push(`request        ${r.url()}`); });
// started, then died (including some blocked loads)
page.on('requestfailed', r => {
  if (insecure(r.url())) hits.push(`requestfailed  ${r.url()}  ${r.failure()?.errorText}`);
});
// blocked before the network, or auto-upgraded: often the ONLY trace
page.on('console', m => { if (m.text().includes('Mixed Content')) hits.push(`console        ${m.text()}`); });

// what the chip would say
const cdp = await context.newCDPSession(page);
let chip = 'unknown';
cdp.on('Security.visibleSecurityStateChanged', e => { chip = e.visibleSecurityState.securityState; });
await cdp.send('Security.enable');

await page.goto(url, { waitUntil: 'networkidle' });
console.log(`security state: ${chip}`);
console.log(hits.length ? hits.join('\n') : 'clean: 0 insecure signals');
await browser.close();

Each listener covers a different case. request sees loads that actually went out over http: or ws:. requestfailed sees insecure requests that started and then failed. console sees what neither of the others may see: a request Chrome blocks before it reaches the network may never fire a request event, and an image Chrome auto-upgrades shows up in request as https://. In both cases the Mixed Content: console line is the only signal. The CDP security state is the closest thing to reading the chip directly. Any hit from any of them counts as a fail.

Run it twice. First logged out. Then log in once with npx playwright codegen --save-storage=auth.json https://your.site/, close the window, and run node insecure.mjs https://your.site/account auth.json against the pages only signed-in users see.

Pass: clean: 0 insecure signals on both runs. Fail: lines naming the URL. If it fails, the bug is yours no matter what the user’s browser looks like. If you’d rather not use Node, open -na "Google Chrome" --args --user-data-dir="$(mktemp -d)" https://your.site/ on macOS (or google-chrome --user-data-dir="$(mktemp -d)" on Linux) gives you the same clean profile with a chip to look at. Log in there by hand for the second half.

3. Optional: count it across real users. Ship a report-only policy. form-action gets its own directive because default-src doesn’t cover form submissions. The policy sends reports both ways, because browsers disagree on which one they support:

Reporting-Endpoints: csp="https://your.site/csp-report"
Content-Security-Policy-Report-Only: default-src https: data: blob: 'unsafe-inline' 'unsafe-eval'; form-action https:; report-uri /csp-report; report-to csp

The two arrive in different shapes. report-uri POSTs application/csp-report with {"csp-report": {"blocked-uri": …, "source-file": …}}. report-to POSTs application/reports+json, an array of {"type": "csp-violation", "body": {"blockedURL": …, "sourceFile": …}}. Normalize both into one table: blocked-uri or blockedURL goes into blocked_uri, and source-file or sourceFile goes into source_file.

SELECT
  CASE
    WHEN source_file IS NULL OR source_file = ''        THEN 'no source recorded'
    WHEN source_file LIKE 'chrome-extension://%'        THEN 'chrome extension'
    WHEN source_file LIKE 'moz-extension://%'           THEN 'firefox extension'
    WHEN source_file LIKE 'safari-web-extension://%'    THEN 'safari extension'
    WHEN source_file LIKE 'https://your.site/%'         THEN 'your code'
    ELSE 'other'
  END AS origin,
  COUNT(*) AS reports
FROM csp_reports
WHERE blocked_uri LIKE 'http:%' OR blocked_uri LIKE 'ws:%'
GROUP BY origin
ORDER BY reports DESC;

A few cautions. source_file is often empty, for example when the blocked load came from an element instead of a script call, which is why that bucket exists and isn’t counted as yours. Cross-origin blocked_uri values may be cut down to the origin. And browsers don’t agree on whether loads injected by extensions get reported under the page’s CSP at all. A your code row is a real lead. A zero in the extension rows tells you nothing either way.

Incognito narrowed it to my profile, not to an extension or stale cache

I changed nothing on the server, which was probably right, but I got there for the wrong reason. Incognito narrowed the problem to my profile. It didn’t tell me whether the cause was an extension, a stale cache or an old redirect, and for logged-in pages it didn’t clear the server at all.

The rule I’m keeping: you own a browser security warning if it reproduces in a profile with no extensions and an empty cache, logged in as the user was. Until you’ve run that test, you don’t know whose bug it is, and Incognito alone doesn’t tell you.