From b1c885a266af0d01747cd9c89e6847e95f0c81d8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 2 Apr 2019 11:18:05 -0600 Subject: [PATCH] Expire mobile guide cookie after 24 hours See https://github.com/vector-im/riot-web/issues/9360 This is to prevent it from always working. Cookies without an expiration are supposed to expire at the end of the session, however the nature of mobile browsers means that the session is unlikely to ever end. --- src/vector/mobile_guide/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vector/mobile_guide/index.js b/src/vector/mobile_guide/index.js index 2c4785f39..9d8a44920 100644 --- a/src/vector/mobile_guide/index.js +++ b/src/vector/mobile_guide/index.js @@ -1,7 +1,8 @@ import {getVectorConfig} from '../getconfig'; function onBackToRiotClick() { - document.cookie = 'mobile_redirect_to_guide=false;path=/'; + // Cookie should expire in 24 hours + document.cookie = 'mobile_redirect_to_guide=false;path=/;max-age=86400'; window.location.href = '../'; }