Start with the customer action

A frame lets another page display your page inside its own layout. That is useful when a trusted partner presents a booking widget, but it can also let a hostile page place misleading controls over your real buttons. The practical question is therefore about each page, not whether every frame is good or bad. List the pages where a visitor can sign in, change an address, pay, approve a quotation or disclose private information. Those pages deserve a deliberate embedding decision because a click made through a deceptive surrounding page could have a real consequence. Separately list public pages that a partner actually embeds. Ask the partner for the exact production origin and the page it needs, then verify that there is a current business owner for the integration. A screenshot of an embedded mockup is not evidence that the production integration still requires access. Keep a simple page-to-parent register so future redesigns do not silently widen the exception.

Know what the older header can express

X-Frame-Options is a narrower HTTP response header. MDN lists DENY and SAMEORIGIN, and says the old ALLOW-FROM form is obsolete. If there is no legitimate embedding, a compatible DENY decision may accompany frame-ancestors 'none'. If only the same origin may embed, SAMEORIGIN can reflect that narrower case. A cross-origin partner exception cannot be represented accurately with X-Frame-Options; use the CSP directive for that decision and test the browser population that matters to your customers. Where both headers are present, browsers supporting frame-ancestors ignore X-Frame-Options. That does not mean a contradictory older header is a useful deliberate policy. Document why it exists and avoid telling operations staff that one header magically overrides every browser. Check what the CDN, application server and hosting platform actually emit after their settings are combined. The effective response is more important than the line entered in an admin panel.

Treat exceptions as page-specific

Consider a Hong Kong tutoring service whose partner needs to place a public timetable widget in a portal. The timetable may be framed by that partner, while account settings and payment confirmation should not inherit the same exception. If the widget links into a full booking flow, decide whether the flow opens in the service's own top-level page. That can preserve a smooth handoff without allowing sensitive pages inside a partner frame. If a partner says every page must be embeddable, ask which exact action fails and inspect the navigation. The need may be for one intermediate page, or it may be a browser cookie behavior that a wider frame allowance will not solve. Record the accepted origin, affected URLs, owner and a review date. An exception should have a reason and an exit path, because partner domains, acquisition arrangements and widget products change. The source policy does not attest that the partner itself is trustworthy.

Test both intended and refused parents

Verify the production response with a network inspection or header request for each representative route, including a signed-in route where it can be inspected safely. Check the final response after redirects, because a header on only the first redirect does not decide the rendered document. Build a harmless test page on an allowed parent and another on a different origin; load the exact target URL as a frame. The first should render if the business exception is intended, and the second should be blocked. Look at the browser console and network response, then repeat with nested framing if the partner portal itself is embedded elsewhere: frame-ancestors checks every ancestor, not only the immediate parent. Run a top-level navigation to ensure the page itself remains reachable. A blocked frame does not mean the service is down. Conversely, a successful direct visit does not prove the embedding rule works. Keep test evidence tied to the response and the browser used.

Avoid accidental policy gaps

Policies often fail at route boundaries. A static page may carry a header while a server-rendered account page does not; a CDN error document may have a different set; a partner integration may use a second hostname. Select examples from each delivery path rather than testing only the home page. Ask whoever owns deployment to identify the single source of policy truth, then compare headers before and after release. If the application emits one policy and the CDN adds another, do not assume the textual settings combine into the business decision you meant. Test the browser result. Keep an explicit exception list for pages that require framing, and review it when adding a new checkout, support widget or partner campaign. Since the question is whether a page may be displayed by another site, a test script that merely checks for the word frame-ancestors can miss the wrong value, wrong route or missing final response. The acceptance test must exercise a real parent.

Keep other protections in view

A frame restriction reduces an important route for clickjacking; it is not a substitute for checking who is signed in and authorised to perform an action. A direct request to a sensitive endpoint still requires the normal session and permission checks. Likewise, a legitimate partner frame should not gain access to data merely because embedding is allowed. Review the effect of browser cookie rules on the journey separately, particularly if a signed-in interaction is placed in a cross-site frame. MDN describes SameSite cookies as an additional partial mitigation, not an unconditional guarantee that every embedded flow will work or fail. Explain these boundaries to the product owner before changing headers. If the partner is being allowed to embed a page, the approval concerns presentation of that page, not permission to impersonate customers, bypass server-side checks or receive private records. A small, tested allowance is easier to reason about than a site-wide exception.

Make the next change reviewable

At the next change request, ask the owner to name the page, the exact parent origin, the customer task and the end date or review trigger. Compare that request with the current policy register. If the page is a payment or account action, ask whether opening it outside the frame would be acceptable before adding a cross-origin exception. Have the developer attach a captured final response header and an allowed-versus-denied browser test. Have support confirm that a refused frame produces an understandable partner handoff rather than a blank unexplained area. When an integration ends, remove only its specific allowance and repeat both tests. The result is a decision trail a small team can maintain: one page, one justified parent, one owner and evidence of the actual browser behavior. This is more useful than declaring a generic security header installed while nobody can say which customer page it governs.

Recheck when the site changes

Make the page-to-parent register part of routine change review. A new login provider may move the sign-in step to a different host; an old partner may migrate its portal; a new marketing landing page may accidentally inherit the header intended for a protected account route. None of these changes proves the previous decision was wrong, but each can make its implementation stale. Review the register when a hostname, customer action, hosting layer or integration owner changes. For a new host, test the real final response and a frame attempt from the actual partner origin before telling the partner the exception is ready. For a retired host, remove the obsolete allowance only after confirming that no current route relies on it. Record the outcome in words a non-specialist owner can read: which page remains available directly, which parent can display it, which parent is refused, and what action a customer takes if framing fails. This creates an accountable maintenance path without promising that a header alone will prevent every form of deceptive interaction.

Before you proceed

  • Can the owner name every partner origin allowed to frame a customer action?
  • Do final responses and browser tests agree on allowed and denied parents?

Sources & further reading