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

Process cross-origin links for subresource preloading #82

Open
twifkak opened this issue Oct 4, 2021 · 0 comments
Open

Process cross-origin links for subresource preloading #82

twifkak opened this issue Oct 4, 2021 · 0 comments
Milestone

Comments

@twifkak
Copy link
Collaborator

twifkak commented Oct 4, 2021

#57 limited its solution of #13 to same-origin preloads for efficiency's sake:

  • Traffic costs for same-origin subrequests are probably cheaper than cross-origin.
  • Most cross-origin hrefs won't have corresponding SXGs, so the preload processing would likely fail (and thus be in vain), while same-origin hrefs would likely have corresponding SXGs because sxg-rs is usually run on the whole origin.

To address this problem, we could mitigate the cost, by caching a per-origin boolean saying whether it supports SXG. Say, 1h expiry. On cache expiry/miss, process the link as if it supports SXG and update the cache accordingly.

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

1 participant