Next.js Discord

Discord Forum

Update a cached page (getStaticProps) after page load on Next 11

Unanswered
Oriental Scops-Owl posted this in #help-forum
Open in Discord
Oriental Scops-OwlOP
I have some pages that need to be cached in Next 11. the only issue is the header contains dynamic content that includes user information. Is there any way to update a static page after the page has loaded? (we need to update the header component with user information either from redux or from cookies)

we had a company meeting friday and everyone else thinks its something that should be easy to do but ive spent hours on trying to find a way to do it and havent had any success.

the only other solution or idea was to use some kind of middleware to load getStaticProps rendered pages if the user is not logged in and if they are logged in to serve the getServerProps page instead.

can someone please confirm if either of these 2 ideas are possible? this has been on ongoing issue for months

we are trying to speed up page load time for google crawling to help with indexing

0 Replies