Commit 4f9ce1a
committed
Extend expiry of user benefits cookies to 30 days
Previouly they 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.1 parent 48b47c4 commit 4f9ce1a
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 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
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