We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1aaf0c commit 1b177b9Copy full SHA for 1b177b9
src/runtime/plugin.client.ts
@@ -78,7 +78,7 @@ export default defineNuxtPlugin((nuxtApp) => {
78
function setPreferenceToStorage(storageType: typeof storage, preference: string) {
79
switch (storageType) {
80
case 'cookie':
81
- window.document.cookie = storageKey + '=' + preference
+ window.document.cookie = `${storageKey}=${preference}; max-age=${60 * 60 * 24 * 365}; path=/`
82
break
83
case 'sessionStorage':
84
window.sessionStorage?.setItem(storageKey, preference)
0 commit comments