Before enabling cross-origin isolation for a public tool, identify the capability it needs and every dependency that must continue to load. A true crossOriginIsolated value is useful evidence about a document’s context. It is not proof that its scripts, workers or existing cross-window workflow still work.
This guide uses a harmless fictional tool with static explanatory text, a same-origin worker and one public cross-origin script. It performs no calculation on customer data and opens no authentication or checkout flow. Do not apply its headers globally to an actual product without the responsible engineering and security review.
The CORS reading-boundary guide addresses a script reading a cross-origin response. This procedure tests a different composition:document isolation plus the resource contracts needed by its dependencies.
Keep the three policies in their actual roles
The current MDN crossOriginIsolated reference describes a secure context with the relevant opener/embedder headers and an unblocked cross-origin-isolated Permissions Policy. The example here chooses Cross-Origin-Opener-Policy:same-origin and Cross-Origin-Embedder-Policy:require-corp. It does not claim those are the right settings for every page.
The COEP reference explains that require-corp restricts cross-origin no-cors resources unless their response policy permits embedding;CORS-mode requests must instead satisfy CORS. A successful 200 response alone cannot establish that an isolated document may use the resource.
The COOP reference separately explains browsing-context relationships. Depending on the policies and navigation context, opener references can be severed. Keep that consequence in the architecture review rather than treating an isolation header as an SEO-only setting.
Populate the fictional dependency manifest
The owner approves these exact resource roles for the controlled fixture:
| Node | Origin and role | Required fixture contract |
|---|---|---|
| Tool document | https://tool.example/;public HTML | Secure context;COOP same-origin;COEP require-corp;permission not blocked |
| Worker | https://tool.example/worker.js;same-origin | JavaScript response with compatible COEP require-corp;reports its own isolation state |
| Label script | https://assets.example/tool-label.js;public classic script | no-cors load with Cross-Origin-Resource-Policy:cross-origin |
| Popup dependency | None in this minimal tool | No claim that an existing authentication popup was tested |
The external script contains no private data. Its complete body sets a harmless marker:document.documentElement.dataset.asset='ready'. The worker’s complete body is postMessage(self.crossOriginIsolated). These are synthetic diagnostics, not application functionality.
Use the complete document fixture
Serve this HTML under the document headers in the manifest. Serve the worker with the stated compatible response, and the external script with its explicit public resource policy. No other remote requests are required.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fictional public tool fixture</title>
<script src="https://assets.example/tool-label.js"></script>
</head>
<body>
<p>Public explanation: this harmless fixture checks isolation readiness.</p>
<p>Document isolated: <output id="document-state"></output></p>
<p>Worker isolated: <output id="worker-state"></output></p>
<script>
document.getElementById('document-state').textContent = String(crossOriginIsolated);
const worker = new Worker('/worker.js');
worker.onmessage = event => {
document.getElementById('worker-state').textContent = String(event.data);
};
</script>
</body>
</html>
The public explanation is present independently of the worker result. A failed dependency should not silently turn the intended public explanation into an empty shell. The output nodes are diagnostics for this fixture, not claims that a production calculator has completed useful work.
Keep context readiness and dependency success separate
In the complete baseline, inspect window.crossOriginIsolated, the worker’s reported value and the external-script marker. Record all three. If an approved browser reports an unexpected state, inspect its actual response headers, secure context and policy support rather than forcing a pass.
Now remove the external script’s CORP header while keeping the document isolation headers. The document can remain isolated even though the cross-origin no-cors script is blocked. The asset marker must be absent. That case demonstrates why the isolation boolean alone cannot certify the dependency graph.
For a second negative, remove the document’s COEP header. The intended isolation contract fails even if the script otherwise loads. Preserve browser errors and response evidence beside the values. A quiet console or successful status count is not the acceptance condition.
Keep a policy-denial control in the expected matrix
Add an explicit Permissions-Policy denial in the controlled fixture while preserving both isolation headers. Under the documented contract, blocking cross-origin-isolated prevents the document from obtaining the intended capability. This catches a release check that looks only for two header strings.
| Controlled state | Expected document isolation | Expected external marker |
|---|---|---|
| Complete approved baseline | True | Ready |
| External CORP removed | Can remain true | Absent |
| Document COEP removed | False | Can still be ready |
| Permissions-Policy denies cross-origin-isolated | False | Can still be ready |
The literal denial header for this negative is Permissions-Policy:cross-origin-isolated=(). It is a test input, not a production recommendation. Record the worker’s independent result as well. A failed document capability does not establish that every resource failed, and an apparently working label does not establish isolation.
Do not solve the dependency failure by broad policy removal
Choose an approved resource design with the responsible owners. The fixture uses an explicitly public CORP response for one script. Another design might use an appropriate CORS-mode request, move an approved asset to the same origin or remove an unnecessary dependency. Those choices have different requirements.
Do not add permissive access headers to a private API because a public tool wants a label. Use the public/private access review to preserve that separate boundary. CORS and CORP are not interchangeable authentication systems.
Use the dependency-causality method when another policy also blocks a required resource. Multiple restrictions can coexist, and relaxing the wrong one will not establish the intended working state.
Review existing cross-window tasks before widening scope
If a real tool opens another application, uses window.opener or participates in an authorization popup, add that relationship to the graph and create an authorized harmless fixture for it. The minimal example’s absence of popups cannot establish compatibility with a workflow it never represented.
Record the actual communication mechanism and expected handoff before changing headers. A header that isolates the document may alter a previously working reference. The product owner must approve a supported architecture rather than letting a content release silently change authentication behavior.
Keep the deployment scope narrow and test the normal direct URL as well as the intended entry path. An isolated staging page does not prove the production response or every related route has the same policy.
Close with a bounded graph result
The receipt should identify the capability requirement, document and worker states, each dependency’s actual response, negative-case results and any untested window relationships. Keep actual browser context and observation time visible.
Approve when the required isolated context and the defined public dependencies work together under the approved policy. Do not count a true boolean as proof of a complete product task, or a loaded script as proof that isolation succeeded.
The result is an inspectable technical prerequisite for one public tool. It does not establish search rendering, indexing, rankings or that cross-origin isolation should be enabled on the rest of the website.
