Skip to content

Commit

Permalink
Extend cookies expiration time (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
TsayAdobe authored Dec 4, 2024
1 parent 9b2cc9d commit ed1549e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ export default async function init(element) {
});

element.addEventListener('unity:track-analytics', (e) => {
const date = new Date();
date.setTime(date.getTime() + 1 * 60 * 1000);
const cookieExp = `expires=${date.toUTCString()}`;
const cookieExp = new Date(Date.now() + 90 * 1000).toUTCString();

if (e.detail?.event === 'change') {
verbAnalytics('choose-file:open', VERB, e.detail?.data);
Expand Down Expand Up @@ -277,9 +275,7 @@ export default async function init(element) {
});

window.addEventListener('beforeunload', () => {
const date = new Date();
date.setTime(date.getTime() + 1 * 60 * 1000);
const cookieExp = `expires=${date.toUTCString()}`;
const cookieExp = new Date(Date.now() + 90 * 1000).toUTCString();
if (exitFlag) {
document.cookie = `UTS_Redirect=${Date.now()};domain=.adobe.com;path=/;expires=${cookieExp}`;
}
Expand Down

0 comments on commit ed1549e

Please sign in to comment.