Check if a specific Request is a prefetch request created by using
export async function loader({ request }: LoaderFunctionArgs) { let data = await getData(request) let headers = new Headers() if (isPrefetch(request)) { headers.set("Cache-Control", "private, max-age=5, smax-age=0") } return json(data, { headers })} Copy
export async function loader({ request }: LoaderFunctionArgs) { let data = await getData(request) let headers = new Headers() if (isPrefetch(request)) { headers.set("Cache-Control", "private, max-age=5, smax-age=0") } return json(data, { headers })}
Check if a specific Request is a prefetch request created by using
or .