Skip to content

Use Speculation Rules to speed up link clicks by default #3

@vlucas

Description

@vlucas

Post shared on HN

Uses speculation rules like this:

<script type="speculationrules">
  {
    "prerender": [{ "where": { "href_matches": "/*" }, "eagerness": "moderate" }],
    "prefetch": [{ "where": { "href_matches": "/*" }, "eagerness": "moderate" }]
  }
</script>

To begin preloading and pre-rendering the next HTML page on hover for browsers that support it (currently Chrome only).

This would be a nice progressive enhancement to add for browsers that support it that will not make the experience any worse (or cause any errors) for other visitors whose browsers do not support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions