high-answer-43473
02/01/2024, 5:23 PMfresh-football-47124
fresh-football-47124
high-answer-43473
02/01/2024, 5:35 PMhigh-answer-43473
02/01/2024, 6:17 PMgetFeatures
function
if (Date.now() - lastFetch > 5000) {
maybe we can do a the same using options.next.revalidate
on NextJS fetch
? https://nextjs.org/docs/app/api-reference/functions/fetchfresh-football-47124
future-teacher-7046
localStorage
polyfill possibly using something like Edge Config
2. Specify a fetch
polyfill that adds the Next.js-specific revalidate option to every request
The Node.js instructions show examples of setting these polyfills, but they aren't specific to Next.js middleware, so will likely need some tweaking: https://docs.growthbook.io/lib/js#nodejshigh-answer-43473
02/01/2024, 7:36 PMinstrumentation.ts
would probably be the place to set those polyfills https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation?