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

fix: Make locale cookie a session cookie #1634

Merged
merged 4 commits into from
Dec 23, 2024
Merged

fix: Make locale cookie a session cookie #1634

merged 4 commits into from
Dec 23, 2024

Conversation

amannn
Copy link
Owner

@amannn amannn commented Dec 23, 2024

Initially, I planned to add an expiration of 5 hours to the locale cookie for next-intl@4 to comply with GDPR regulations. However, this has the implication that if the browser remains open for longer than 5 hours, the cookie can be reset in the middle of a session.

Due to this, it seems more reasonable to not set an expiration at all, turning the cookie into a session cookie. Session cookies expiry only when a browser is closed. On mobile, this can be even more beneficial, as browsers are rarely closed (the browser can clear cookies though if memory is constrained).

Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 8:41am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 8:41am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 8:41am

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.

1 participant