Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: WICG/nav-speculation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: WICG/nav-speculation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: background-sync
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 23, 2025

  1. Delay background sync while prerendering

    Closes #354.
    
    The only relevant background sync API accessible from Windows is serviceWorkerRegistration.sync.register(). This registers a sync to happen later when the user is online.
    
    At first I thought allowing this to happen while prerendering might be OK. However, the method explicitly throws an exception if it's used when there are no top-level/auxiliary clients. https://developer.chrome.com/blog/background-sync/ seems to imply this is an abuse prevention measure: "You can only register for a sync event when the user has a window open to the site."
    
    So, we decide to delay any background sync registrations while prerendering.
    domenic committed May 23, 2025
    Configuration menu
    Copy the full SHA
    ac09f76 View commit details
    Browse the repository at this point in the history
Loading