Cross-Origin-Opener-Policy can prevent pages from loading

Having a Cross-Origin-Opener-Policy setting in my netlify.toml prevents pages from loading when navigating quickly on iOS. Interestingly enough, I can only reproduce the issue on iOS (both my personal iPhone 15, and on SauceLabs/Browserstack), and not on desktop or Android. The moment I remove the header setting from netlify.toml, everything works fine again.

Steps to reproduce:

  1. On an iOS mobile device, go to https://heroic-pixie-8732cd.netlify.app/
  2. Quickly click the 2 links to quickly navigate between the 2 pages.
  3. After a few fast page loads (usually 3 page loads), you will suddenly get a blank page.

My netlify.toml:

[[headers]]
  for = "/*"
  [headers.values]
    Cross-Origin-Opener-Policy = "same-origin"

Sorry, I don’t have any Apple devices to test, but if a behaviour is browser-specific, it has less to do with the server and more to do with the browser.

Regardless, there is still an issue that impacts Netlify, and it can be reproduced consistently with different (iOS) devices and different Netlify sites.