GoogleChromeLabs / GoogleChromeLabs/quicklink
Different Accept-Headers for prefetch (link rel="prefetch") and regular request
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 429
- PR merge metrics
- No merged PRs in 30d
Description
I believe this is lower level issue with the browser, but adding it here as well.
When a prefetch is sent, the `accept` header does not fully match what the browser would send.
E.g. in Chrome 99.0.4844.51
Prefetch request has:
```
accept: application/signed-exchange;v=b3;q=0.7,*/*;q=0.8
```
But visiting the page results in an accept header of:
```
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
```
Since the accept header _may_ be used to determine the response type (e.g. here the notation of avif would result in a differing set of HTML) , the prefetch is effectively unused
Contributor guide
Assessment
This issue has not been assessed yet.