So far we had a dedicated Accept header for prefetches. This causes issues, namely that "Vary: Accept" makes the browser unintentionally discard the prefetch (Shopify reported this).
The mitigation, as per the spec PR, is to match the prefetch Accept header with the frame accept header (what we send for standard navigation).
- For now this applies only to same-origin/no-cors prefetches, as our frame Accept header is > 128 bytes, which would cause a preflight and thus a compatibility risk. Solving this gradually would allow us to look at how we can mitigate this for CORS prefetches as well, though it's a lower priority, as navigations are anyway not CORS.
- The SXG ?q= value for the frame Accept header was wrong (0.9), it should have been 0.7 like in prefetch. This patch matches the frame Accept header to use ?=0.7