"prefetch refused disabled for worker requests" error when navigating between pages

I'm getting a "cf-speculation-refused prefetch refused disabled for worker requests" error with "cf-speculation-refused" header when navigating between pages, which seems weird. Is this some known issue with Astro + React + Netlify + Cloudflare + Speed Brain? I'm aware that 503 is a normal response when the content isn't cached, but I don't think this is supposed to be the response, right? I assume that disabling Speed Brain would "fix" the issue, but I can't disable it as I don't have access, and I'd rather have it working.
3 Replies
Chaika
Chaika5w ago
This sounds like more of a #workers-help thing but can you explain a bit more what you mean by "when navigating between pages"? Is your browser actually showing the response? This is intended behavior and it's just so the browser gives up on prefetching without it sending the request to the origin, and yes this is part of Speed Brain
PrussianPrince
PrussianPrinceOP5w ago
1. My browser loads the page 2. There are 2 entries in the network tab for the page URL: one with 503 (with the above error), and one with 200. 3. If I enable Astro's prefetch functionality (it adds link rel="prefetch" tags when hovering over a tags), I'm getting the same 503 error with worker requests
Chaika
Chaika5w ago
Yea, that's speed brain working as intended then It, as a feature, is designed to just serve already cached pages from cache for prefetch and enable prefetch for you. If you want to take over, add your own speculation/prefetch config, and let it go to your origin (in this case, a Worker), then you can disableSpeed brain

Did you find this page helpful?