Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure consistency between HTTP and JavaScript #38

Merged
merged 15 commits into from
Jul 20, 2023
Merged

Ensure consistency between HTTP and JavaScript #38

merged 15 commits into from
Jul 20, 2023

Conversation

arichiv
Copy link
Contributor

@arichiv arichiv commented Oct 28, 2022

As written, the current spec implies that:

  • HTTP headers always reflect the current GPC preference
  • JavaScript properties always reflect the preference when the top-level browsing context started loading

This is inconsistent, and seems like it will lead to weird edge cases if the preference is changed mid-load. I propose that we adopt the approach of JavaScript for HTTP so both return the preference cached at the time of the last top-level navigation.

Further, we should encourage the browser add a mechanism that encourages the user to refresh any pages started with an outdated GPC preference.

Closes #49

As written, the current spec implies that:
- HTTP headers always reflect the current GPC preference
- JavaScript properties always reflect the preference when the top-level browsing context started loading

This is inconsistent, and seems like it will lead to weird edge cases if the preference is changed mid-load.
I propose that we adopt the approach of JavaScript for HTTP so both return the preference cached at the time of the last top-level navigation.
@arichiv
Copy link
Contributor Author

arichiv commented Nov 28, 2022

@darobin for review

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
arichiv and others added 2 commits April 27, 2023 04:39
Co-authored-by: Martin Thomson <mt@lowentropy.net>
@AramZS
Copy link
Contributor

AramZS commented Apr 27, 2023

CG came to agreement for an update to this text. @arichiv will author.

@arichiv
Copy link
Contributor Author

arichiv commented May 2, 2023

@AramZS how does this look?

@arichiv arichiv requested a review from martinthomson May 3, 2023 08:55
@AramZS AramZS requested a review from npdoty May 11, 2023 17:41
@arichiv
Copy link
Contributor Author

arichiv commented Jun 20, 2023

@npdoty for review

Copy link
Contributor

@npdoty npdoty left a comment

Choose a reason for hiding this comment

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

Thanks for writing up this text for making signals consistent to the scope of a navigation.

I've made some minor suggestions, mostly editorial. Also, I think the UA prompt recommendation can be less specific while still accomplishing the goal of not confusing the user about how the preference will go into effect.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@arichiv arichiv requested a review from npdoty June 23, 2023 10:49
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@npdoty
Copy link
Contributor

npdoty commented Jun 23, 2023

Thanks, Ari. One editorial correction. Editors, feel free to merge and make any fixes yourself.

@SebastianZimmeck
Copy link
Member

@martinthomson, would you like to review this PR? (If you are busy, feel free to let me know, and I can do it.)

@arichiv
Copy link
Contributor Author

arichiv commented Jun 28, 2023

@martinthomson for review

Copy link
Contributor

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

This seems broadly OK, at least as far as this captures the outcome of the discussion.

FWIW, I'm of the view that inconsistency isn't inherently a problem. If values could change, that doesn't mean that they will. The only concrete problem I'm aware of is providing high resolution access that might allow a site to learn about when the preference changes. Then changes that appear at the same time might be used to leak cross-site information. That problem is fixed more readily by advising implementers not to allow that to happen. Being specific about the fix, at this level of detail, constrains implementations in ways that - at least in my experience - can have unwanted effects. A looser specification gives implementers more latitude in how they respond to evolving threats.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Co-authored-by: Martin Thomson <mt@lowentropy.net>
@arichiv
Copy link
Contributor Author

arichiv commented Jul 17, 2023

@martinthomson have time to take another look and merge?

@martinthomson
Copy link
Contributor

I'm OK with this, but the decision to merge is up to editors.

@SebastianZimmeck
Copy link
Member

I'm OK with this, but the decision to merge is up to editors.

@martinthomson, can you approve your review? Then, I will merge.

@SebastianZimmeck SebastianZimmeck self-requested a review July 20, 2023 13:38
@SebastianZimmeck SebastianZimmeck merged commit e0c73ac into privacycg:main Jul 20, 2023
@arichiv arichiv deleted the patch-1 branch July 20, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure consistency between HTTP and JavaScript
5 participants