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: cache subdomain discovery #928

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Conversation

pauldambra
Copy link
Member

We use setting cookies to discover the first non-public domain so that we can identify what domain to set a cookie on.

E.g. ww.example.com.au and foo.example.com.au are both on example.com.au. This is because the length of the public part is variable and the list of public domains is very long.

However Firefox prints a warning when it can't set a cookie because of an invalid domain (maybe it only started recently 🤷). This doesn't help anyone. But it does prompt users to ask us why there are so many warnings logged.

You can't change (sub-)domain without a full page refresh. So, it's safe to store that value in memory.

This should mean that someone only sees at most four logs per page refresh

Copy link

github-actions bot commented Dec 7, 2023

Size Change: +144 B (0%)

Total Size: 745 kB

Filename Size Change
dist/array.full.js 176 kB +36 B (0%)
dist/array.js 118 kB +36 B (0%)
dist/es.js 118 kB +36 B (0%)
dist/module.js 118 kB +36 B (0%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 12 kB
dist/recorder-v2.js 104 kB
dist/recorder.js 58.4 kB
dist/surveys.js 41.5 kB

compressed-size-action

@pauldambra pauldambra requested a review from a team December 7, 2023 18:33
@pauldambra pauldambra added the bump patch Bump patch version when this PR gets merged label Dec 7, 2023
@pauldambra pauldambra merged commit 59c9d42 into master Dec 11, 2023
13 checks passed
@pauldambra pauldambra deleted the fix/cache-subdomain-discovery branch December 11, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants