funkyj8157
funkyj8157
NNuxt
Created by funkyj8157 on 2/22/2025 in #❓・help
Usecookie and isr cache conflict
usecookie cookie resets to default after isr cache is refreshed. So i have this code // Cookies const cookieBannerDismissed = useCookie("cookieBannerDismissed", { default: () => false, maxAge: 60 * 60 * 24 * 30, // 30 days in seconds path: "/", // Set the cookie for the root path }); const statisticsCookie = useCookie("statisticsEnabled", { default: () => true, maxAge: 60 * 60 * 24 * 30, // 30 days in seconds path: "/", // Set the cookie for the root path }); and in nuxtconfig routeRules: { "/": { isr: 1200 }, "/foodtrucks": { isr: 1200 }, "/foodtrucks/**": { isr: 1200 }, "/zo-werkt-het": { isr: 1200 }, "/over-ons": { isr: 1200 }, "/foodtruck-aanmelden": { isr: 1200 }, "/contact": { isr: 1200 }, }, so my issue is after 1200 seconds over the usecookie resets. So the banner is shown again. How to prevent this? I dont read anything in the docs
5 replies