Commit 32374ae
authored
Extend expiry of user benefits cookies to 30 days (#3285)
This PR extends the expiration of all user benefits cookies to 30 days -
`GU_AF1`, `gu_allow_reject_all`, `gu_hide_support_messaging`. The cookie
which tracks when the other cookies need refreshing
(`gu_user_benefits_expiry`) continue to have an expiry of 1 day.
Previously these cookies were short lived (1-2 days) but this resulted
in edge cases where if a signed in user didn't visit the site for more
than a couple of days, when they returned their first page view wouldn't
reflect their benefits (i.e. they would see ads). This is due to a race
condition between the user benefits refresh and the ads code. However,
we don't want to delay ads until after the user benefits have been
refreshed as that would impact performance. So instead, extend the
expiry of the cookie.
Note: this may result in a user getting benefits they no longer have on
the first returning pageview, but this will be correct from the second
page view onwards. We think this is OK.
See also:
guardian/frontend#28352
guardian/dotcom-rendering#14810
guardian/support-frontend#75591 parent 8c51c17 commit 32374ae
1 file changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
109 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
110 | 116 | | |
111 | | - | |
112 | | - | |
| 117 | + | |
113 | 118 | | |
114 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
115 | 124 | | |
116 | 125 | | |
0 commit comments