Skip to content

Fix issue 42871#42874

Merged
wbamberg merged 4 commits intomdn:mainfrom
wbamberg:fix-42871
Jan 30, 2026
Merged

Fix issue 42871#42874
wbamberg merged 4 commits intomdn:mainfrom
wbamberg:fix-42871

Conversation

@wbamberg
Copy link
Copy Markdown
Collaborator

Fixes #42871.

@doerwalter, does this address the issue for you?

I took out the bit about "it only works if the browser supports it" because surely that's obvious.

@wbamberg wbamberg requested a review from a team as a code owner January 22, 2026 21:23
@wbamberg wbamberg requested review from hamishwillee and removed request for a team January 22, 2026 21:23
@github-actions github-actions Bot added Content:HTTP HTTP docs size/xs [PR only] 0-5 LoC changed labels Jan 22, 2026
Comment thread files/en-us/web/http/reference/headers/x-frame-options/index.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 22, 2026

Preview URLs (1 page)

(comment last updated: 2026-01-30 05:23:49)

@doerwalter
Copy link
Copy Markdown

This looks good to me. Thanks!

@github-actions github-actions Bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jan 30, 2026

- `DENY`
- : The page cannot be displayed in a frame, regardless of the site attempting to do so. Not only will the browser attempt to load the page in a frame fail when loaded from other sites, attempts to do so will fail when loaded from the same site.
- : The document cannot be loaded in any frame, regardless of origin (both same- and cross-origin embedding is blocked).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional text was redundant.

- : The document cannot be loaded in any frame, regardless of origin (both same- and cross-origin embedding is blocked).
- `SAMEORIGIN`
- : The page can only be displayed if all ancestor frames have the same {{glossary("origin")}} as the page itself. You can still use the page in a frame as long as the site including it in a frame is the same as the one serving the page.
- : The document can only be embedded if all ancestor frames have the same {{glossary("origin")}} as the page itself.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional text was inconsistent with the first statement - you can only embed content if all ancestors are sameorigin, not just the parent.

Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wbamberg I would probably have argued that it is obvious that not having the header would allow embedding - otherwise why would you have it. Does no harm though and definitely not worth mentioning the "if supported" thing.

I made a minor modification to the directives since they were horrible. I've approved this so you can merge if you don't hate those changes.

@wbamberg
Copy link
Copy Markdown
Collaborator Author

@wbamberg I would probably have argued that it is obvious that not having the header would allow embedding - otherwise why would you have it. Does no harm though and definitely not worth mentioning the "if supported" thing.

Yeah, I don't think it hurts to indicate what happens without it. Your other edits look great to me too, I didn't even check that.

@wbamberg wbamberg merged commit d1ce18e into mdn:main Jan 30, 2026
7 checks passed
pranjal2004838 pushed a commit to pranjal2004838/content that referenced this pull request Feb 25, 2026
* Fix issue 42871

* Update files/en-us/web/http/reference/headers/x-frame-options/index.md

* mention xs-leaks

* Directives - remove confusing redundancy

---------

Co-authored-by: Hamish Willee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decription of behaviour without the X-Frame-Options header is missing

4 participants