Isn't this header native to Vercel though? Regardless, you can still accomplish this to a certain extent using a data fetching library like useSWR, no?
Ah interesting, thanks for this. I'll also update the post with more info directly from the docs to add more context around how to manage the response.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
in next all you need to do is call
res.setHeader('Cache-Control', 's-maxage=60, stale-while-revalidate')to set the header.
Isn't this header native to Vercel though? Regardless, you can still accomplish this to a certain extent using a data fetching library like useSWR, no?
Ah interesting, thanks for this. I'll also update the post with more info directly from the docs to add more context around how to manage the response.