Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding a new header for server-side detection of speculation-rules initiated requests #337

Closed
SulemanAhmadd opened this issue Sep 27, 2024 · 1 comment

Comments

@SulemanAhmadd
Copy link

Currently, both prefetch requests initiated through Resource Hints (like the rel=prefetch attribute) and those triggered by speculation rules include the Sec-Purpose: prefetch request header. While there’s no significant semantic difference between these requests (as both are for prefetching resource), servers, especially in CDN use cases where speculation rules may be deployed on behalf of customers alongside customer-specific link prefetching, need a way to distinguish between the two.

It would be useful for servers to have a mechanism to differentiate between prefetch requests initiated by speculation rules vs initiated by other methods. I believe tag values defined in #336 can be helpful for this use-case as well.

domenic added a commit that referenced this issue Jan 31, 2025
@domenic
Copy link
Collaborator

domenic commented Jan 31, 2025

The in-progress speculation rules tags feature solves this; see the explainer.

In the interests of keeping everything together, let me use #336 to track the work on specifying that feature, and so close this issue.

@domenic domenic closed this as completed Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants