Skip to content

Security 2025 chapter edits#4357

Merged
tunetheweb merged 9 commits intoHTTPArchive:mainfrom
clarkio:patch-1
Jan 14, 2026
Merged

Security 2025 chapter edits#4357
tunetheweb merged 9 commits intoHTTPArchive:mainfrom
clarkio:patch-1

Conversation

@clarkio
Copy link
Copy Markdown
Contributor

@clarkio clarkio commented Jan 14, 2026

Refine language and improve clarity in security.md

Refine language and improve clarity in security.md up to section on "keywords for script-src"
@tunetheweb tunetheweb added the editing Content excellence label Jan 14, 2026
@tunetheweb tunetheweb changed the title Edit security.md for clarity and grammar improvements Security 2025 chapter edits Jan 14, 2026
@clarkio clarkio marked this pull request as ready for review January 14, 2026 22:08
Comment thread src/content/en/2025/security.md Outdated
Comment thread src/content/en/2025/security.md Outdated
Comment thread src/content/en/2025/security.md Outdated
#### Use of `document.domain`

By using [`document.domain`](https://developer.mozilla.org/docs/Web/API/Document/domain), a developer was able to read the domain portion of the current document, as well as set a new domain (only superdomains of the current domain are allowed), after which the browser will use the new domain as origin for the same-origin policy checks. However, the use of this property is now deprecated and browsers may stop supporting the property soon.
By using [`document.domain`](https://developer.mozilla.org/docs/Web/API/Document/domain), a developer is able to read the domain portion of the current document, as well as set a new domain (only subdomains of the current domain are allowed), after which the browser will use the new domain as origin for the same-origin policy checks. However, the use of this property is now deprecated and browsers may stop supporting the property soon.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure about this change. I think superdomain was intentional.

https://developer.mozilla.org/en-US/docs/Web/API/Document/domain#setting_the_domain

It can only be set to the same or a parent domain. For example, if https://a.example.com and https://b.example.com both use document.domain = "example.com"; then they have both modified their origin to have the same domain, and they can now access each other's DOM directly—despite being cross-origin, which would normally prevent such access.

Maybe should be more explicit (like MDN is) in case others think this is a typo?

Copy link
Copy Markdown
Contributor Author

@clarkio clarkio Jan 14, 2026

Choose a reason for hiding this comment

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

tbh I wasn't sure either but I saw no mention of "superdomain" in the MDN page which led me to believe subdomain may have been intended here. Who can we double check with on this one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@vikvanderlinden @GJFR

But I'm pretty confident they meant superdomain so let's revert to that for now:

Suggested change
By using [`document.domain`](https://developer.mozilla.org/docs/Web/API/Document/domain), a developer is able to read the domain portion of the current document, as well as set a new domain (only subdomains of the current domain are allowed), after which the browser will use the new domain as origin for the same-origin policy checks. However, the use of this property is now deprecated and browsers may stop supporting the property soon.
By using [`document.domain`](https://developer.mozilla.org/docs/Web/API/Document/domain), a developer is able to read the domain portion of the current document, as well as set a new domain (only superdomains of the current domain are allowed), after which the browser will use the new domain as origin for the same-origin policy checks. However, the use of this property is now deprecated and browsers may stop supporting the property soon.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this is superdomain. Although maybe we can rephrase to more explicitly include the same domain as well?

From the linked MDN document:

...
It can only be set to the same or a parent domain. For example, if https://a.example.com and https://b.example.com both use

document.domain = "example.com";

then they have both modified their origin to have the same domain, and they can now access each other's DOM directly
...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets leave as is and merge this.

Comment thread src/content/en/2025/security.md Outdated
clarkio and others added 4 commits January 14, 2026 17:29
Co-authored-by: Barry Pollard <barrypollard@google.com>
Co-authored-by: Barry Pollard <barrypollard@google.com>
Co-authored-by: Barry Pollard <barrypollard@google.com>
@tunetheweb tunetheweb merged commit 5a22494 into HTTPArchive:main Jan 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editing Content excellence

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants