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

Throw when passed a 0 for lifetimeDays #81

Closed
apasel422 opened this issue Feb 4, 2025 · 8 comments · Fixed by #86
Closed

Throw when passed a 0 for lifetimeDays #81

apasel422 opened this issue Feb 4, 2025 · 8 comments · Fixed by #86
Assignees

Comments

@apasel422
Copy link
Contributor

From https://w3c.github.io/ppa/#dom-privateattributionimpressionoptions-lifetimedays:

lifetimeDays, of type unsigned long, defaulting to 30
A "time to live" (in days) after which the impression can no longer receive attribution. If not specified, the default is 30 days. The user agent should impose an upper limit on the lifetime, and silently reduce the value specified here if it exceeds that limit.

@csharrison
Copy link
Contributor

My vote is no.

@martinthomson
Copy link
Member

Would you recommend that we require that browsers abort (i.e., throw) if a value of zero is provided? The alternative is to treat the saveImpression call as a noop.

@csharrison
Copy link
Contributor

I prefer throwing. I see no benefit to silently treating it as a no-op.

@apasel422
Copy link
Contributor Author

+1 for throwing.

@martinthomson martinthomson changed the title Is 0 a valid value for lifetimeDays? Throw when passed a 0 for lifetimeDays Feb 5, 2025
@martinthomson
Copy link
Member

OK, now we have an issue that is not a question, but a TODO item :) Pull requests welcome.

@bmcase
Copy link
Contributor

bmcase commented Feb 6, 2025

Why are we focused on what happens for passing 0? I thought the question was about whether we should allow impressions to be queried a long time after they are placed or should silently reduce time to live value. To which I understood @csharrison vote of "no" to be saying we shouldn't have an upper limit on the lifetime.

@csharrison
Copy link
Contributor

@bmcase sorry there is a misunderstanding, as Martin changed the issue title. The original title of the issue was "Is 0 a valid value for lifetimeDays?"

@bmcase
Copy link
Contributor

bmcase commented Feb 6, 2025

Thanks for clarifying @csharrison! I miss understood. In which case you were just responding with "no" zero shouldn't be a valid value. Makes sense now.

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 a pull request may close this issue.

4 participants