remix icon indicating copy to clipboard operation
remix copied to clipboard

Vercel cache always misses when using Link

Open mikkel-arturo opened this issue 5 months ago • 0 comments

I have a Remix application deployed on vercel with the following header configuration

export const headers: HeadersFunction = () => ({
  'Cache-Control': 'public, max-age=0, s-maxage=600, stale-while-revalidate=60',
  Vary: 'Accept-Encoding, User-Agent',
})

I am using import { Link } from '@remix-run/react' throughout my code for navigation.

When I load a page directly, it is properly caching image

However, when I navigate through the site, it always has cache misses image

If i directly hit https://store-new-stage.nftreasure.com/?_data=routes%2F_index etc through curl then it does cache, so it's only going through Remix Links that is causing the behavior. I can't find any information on this - can you help?

mikkel-arturo avatar Sep 19 '24 13:09 mikkel-arturo