Cross-domain isolation requires setting two response headers at the same time, why third-party images and scripts suddenly do not load

📅 2026-10-11 👁️ 17

What's the matter with the third-party images and scripts not loading after setting them? This problem usually occurs after developers add cross-origin isolation policies to the site. Cross-origin isolation requires setting two response headers simultaneously - Cross-Origin-Embedder-Policy controls which cross-origin resources the document on this site is allowed to load, and Cross-Origin-Opener-Policy controls the reference relationship between windows - both of which need to be set together to mark the document as an isolated environment.Once the isolation strategy takes effect, third-party images and scripts without cross-domain permission tags on the page will be blocked from loading by the browser.

What do the two response headers manage separately

Cross-Origin-Embedder-Policy (abbreviated COEP) determines whether the current document can refer to cross-origin resources. If not set, the browser treats it as unsafe-none and imposes no restrictions on cross-origin resources. Once set to require-corp, cross-origin resources must be explicitly declared in some way to allow them to be referenced by this site, otherwise the request will be intercepted.

Cross-Origin-Opener-Policy (abbreviated COOP) determines the reference relationship between the current document and the newly opened window. When set to same-origin, the newly opened cross-origin window no longer holds a reference to the window.opener of the original document, and the original document cannot access the other in reverse. This strategy cuts off the cross-domain channel between windows.

COEP instruction value comparison

directive behavior
unsafe-none Default value, does not impose cross-origin resource restrictions
require-corp Cross-origin resources must carry the crossorigin attribute or the Cross-Origin-Resource-Policy header to be allowed to load
credentialless Cross-origin requests without credentials are allowed, but the response must not include cookies

require-corp is the most commonly used isolation mode. Under this rule, when a page references images or scripts from external domains, the response of the resource must include the Cross-Origin-Resource-Policy pass mark, and the reference tag also needs to be added with the crossorigin attribute. If either side is missing the mark, the browser treats the resource as unauthorized and blocks loading.

Why must the two headers be set in pairs

The specification requires cross-domain isolation status to meet two conditions: COEP set to require-corp or credentialless, and COOP set to same-origin.If any of them are missing, the document will not be marked as isolated environment. SharedArrayBuffer and precise timers depend on the isolated state to be used, which is a common motivation for developers to set response headers.If only COEP was set without COOP, although isolation was not fully achieved, the resource limit was triggered prematurely - the sudden failure of third-party resources often originates from this.

Troubleshooting思路 for third-party resource loading failures

First confirm the actual scope of the isolation strategy. Open the developer tool Console to check if there are any error messages from resources being blocked by COEP, the error will provide the domain name of the intercepted resource and the required tag.Check if the intercepted third-party resource itself sent a Cross-Origin-Resource-Policy header;If the resource is hosted by an external service provider, contact the party to add this header in the response. Also, check if the page reference tag has added crossorigin=“anonymous”;Even if the resource carries the CORP release mark, the tag side will still be intercepted if the property is missing. For third-party components that cannot be modified, they can be placed in an independent iframe, and COEP should not be set on the document of the iframe, thereby bypassing the isolation strategy of this site.

Common questions

Q: Why can't third-party images be loaded when only COEP is set and COOP is not?

A: The resource restrictions of COEP take effect independently of the isolation state. As long as the response header contains require-corp, cross-origin resources must meet the marker requirements, regardless of whether COOP is set. The failure to achieve complete isolation does not mean that the restrictions have not been triggered.

Q: Where should the cross-origin permission marker be added?

A: Both sides must be met simultaneously. Add the crossorigin attribute on the referencing tag side and the Cross-Origin-Resource-Policy header on the resource service side. Any missing side may cause the load to fail.

Q: Can credentialless replace require-corp?

A: credentialless allows sending cross-origin requests without credentials, suitable for loading third-party images that cannot be modified. However, it must be set to same-origin by COOP in order to enable cross-origin isolation, and not all browsers fully support this command; compatibility with the target browser must be confirmed before deployment.

Related articles

An interface method that can carry hundreds of password combinations in a single request, why can't it prevent login failure lock?

In the early legacy remote procedure call interface, there is a batch method that can pack hundreds of username-password combinations into a minimal number of HTTP requests, making the login lock based on the number of failures ineffective; the same mechanism can also be used for amplification attacks. Whether to retain such entries and at what level to intercept is an inevitable judgment when the interface is closed.

2026-10-11

After reviewing dozens of generative optimization studies, it is said that changing the engine technique is not valid, how can the site's practice prove itself

A review of research covering the years 2023 to 2026 reviewed dozens of optimization experiments for generative engines, concluding that thematic relevance and contextual position are the most reproducible, general techniques are difficult to migrate to different engines, and no technique has been proven to have stable, long-term, cross-platform effects. The content site needs to use is to replace others' conclusions with self-site comparative verification.

2026-10-11

The AI gateway makes web search into an interface to provide externally, and the content retrieved by the model is more than a list of whose.

When web search is made into an interface on the gateway, the content being retrieved goes through an additional checklist on the gateway side. Cloudflare connected the search capability to the AI gateway at the beginning of October 2026 and required the results to include the source address of the content retrieved. For content sites, discoverability is no longer solely determined by search engine crawling, and the site description file and crawling exclusion rules need to be in place in the chain.

2026-10-11

What categories are the build cache of static site generators divided into, and can the cache expiration be set to never expire?

The static site generator divides resources, images, modules, etc. into multiple categories of cache during the build period, each with its own directory and retention time. Negative values indicate that the cache never expires, and some are set to expire by default every hour. When the build is slow, first confirm which directory the cache falls into, then decide whether to extend the retention or clean up by version.

2026-10-11

The preload in the response header does not always work, which types of relationship are reliable in the HTTP header?

Resource pre-fetch can be written in page tags and can also be put into the HTTP response header, but most link relationship types do not take effect when put into the response header, and the truly reliable ones are pre-connection and pre-loading, and can also be配合 with early hints. Which layer should provide the resources to be pre-fetched for the first screen, and how to package the URI, is worth determining according to the actual output method of static files.

2026-10-11

In addition to the severity score, there is also a score predicting the probability of a vulnerability being exploited, how to use it.

The severity rating answers how great the impact is, and another type of score answers the probability of this vulnerability being actually exploited in the future. EPSS provides probability and percentile for each publicly disclosed vulnerability every day, and the official recommendation is to consider it along with the severity rating and the list of in-the-wild exploitation to prioritize the handling queue.

2026-10-11

The mechanism of notifying search engines of new links in real time, which companies are currently on the support list.

In addition to submitting the sitemap, there is also a type of immediate notification mechanism that directly informs participating engines of new, updated, or deleted links. The list of supported engines is based on the official website, and engines outside the list still follow their own channels. For Chinese sites, the sitemap is responsible for full-scale, and active push is responsible for incremental, getting new links to the correct engines as soon as possible is more practical than repeated submission.

2026-10-11

There is a paper that points out that optimization of generative methods brings two types of risks, and where content stations should self-check for two places.

A paper with a stand reminds us that the risk of generative engine optimization lies on the side of the engine rather than the content side: on one hand, visibility is more likely to concentrate on a few sources, and on the other hand, the potential commercial impact that may be mixed into evidence and reasoning may not be disclosed. The two aspects that the site can self-check are: who is speaking for your page, and whether there are any unexplained impact sources in the answers.

2026-10-11