Commit aac61f51 authored by Sean McGivern's avatar Sean McGivern Committed by Brandon Labuschagne

Give performance bar cookie an expiry date

Without an expiry, it's a session cookie, which means it could be
cleared on browser exit.
parent c33201cc
...@@ -117,9 +117,9 @@ export default class Shortcuts { ...@@ -117,9 +117,9 @@ export default class Shortcuts {
e.preventDefault(); e.preventDefault();
const performanceBarCookieName = 'perf_bar_enabled'; const performanceBarCookieName = 'perf_bar_enabled';
if (parseBoolean(Cookies.get(performanceBarCookieName))) { if (parseBoolean(Cookies.get(performanceBarCookieName))) {
Cookies.set(performanceBarCookieName, 'false', { path: '/' }); Cookies.set(performanceBarCookieName, 'false', { expires: 365, path: '/' });
} else { } else {
Cookies.set(performanceBarCookieName, 'true', { path: '/' }); Cookies.set(performanceBarCookieName, 'true', { expires: 365, path: '/' });
} }
refreshCurrentPage(); refreshCurrentPage();
} }
......
---
title: Set performance cookie to last for a year
merge_request: 43692
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment