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

Implement speculative prerendering (Speculation Rules) #13603

Open
swissspidy opened this issue Mar 12, 2024 · 0 comments
Open

Implement speculative prerendering (Speculation Rules) #13603

swissspidy opened this issue Mar 12, 2024 · 0 comments
Labels
P3 Nice to have Type: Enhancement New feature or improvement of an existing feature Type: Performance Performance related issues and enhancements.

Comments

@swissspidy
Copy link
Collaborator

swissspidy commented Mar 12, 2024

Feature Description

The WordPress core performance team has recently launched the Speculation Rules feature plugin, which leverages the Speculation Rules API to enable dynamically prefetching/prerendering URLs based on user interaction.

See https://developer.chrome.com/docs/web-platform/prerender-pages for an explainer blog post.

This made me wonder how we could implement this API in Web Stories as well.

Some possibilities:

  • In the Web Stories dashboard or the "All Stories" page:
    • Preload the editor when hovering over the story edit link
    • Maybe even preload the editor when hovering over the link to create a new story (if auto-drafts are not an issue)
    • Preload the story permalink when hovering over the link to view the story
  • On the frontend
    • Support preloading the archive page or individual stories upon hovering

Implementation-wise:

  • Leverage the Speculation Rules plugin if it is active
  • If the plugin is not active:
    • Either add a new SpeculativePrerendering service.
    • Alternatively, add a new HasPrerendering interface so every relevant service can indicate preloading/prerendering rules for it.

A dedicated service is probably easiest, no need to overcomplicate things.

Alternatives Considered

Additional Context

@swissspidy swissspidy added Type: Enhancement New feature or improvement of an existing feature Type: Performance Performance related issues and enhancements. P2 Should do soon labels Mar 12, 2024
@swissspidy swissspidy added this to the 1.36.0 milestone Mar 13, 2024
@swissspidy swissspidy modified the milestones: 1.36.0, 1.37.0 Apr 4, 2024
@swissspidy swissspidy modified the milestones: 1.37.0, 1.38.0 Jun 17, 2024
@swissspidy swissspidy removed this from the 1.38.0 milestone Jun 25, 2024
@swissspidy swissspidy added P3 Nice to have and removed P2 Should do soon labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Nice to have Type: Enhancement New feature or improvement of an existing feature Type: Performance Performance related issues and enhancements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant