Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Process cross-origin links for subresource preloading #82

@twifkak

Description

@twifkak

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions