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

Don't do speculative loading on Incognito/Private window #130

Open
isaumya opened this issue Apr 17, 2024 · 2 comments
Open

Don't do speculative loading on Incognito/Private window #130

isaumya opened this issue Apr 17, 2024 · 2 comments

Comments

@isaumya
Copy link

isaumya commented Apr 17, 2024

Recently I got to play with your newly updated script with Speculative Loading added to it. It's amazing but here are a few gotcha's that I faced, so I'm sharing them here (maybe you will fix some and add some to the documentation):

  1. Speculative loading doesn't work on the Incognito/Private window. If you check under "Application Tab" in your dev tools then you will see: The prefetch was not performed because the browser is in Incognito or Guest mode. I really wish there was a way/function to check if the user is using incognito mode and if so use the fallback link mechanism otherwise use Speculative loading. Unfortunately, as much as I have tried I couldn't come up with a single function to check if the user is using incognito mode.
  2. Another thing to keep in mind (maybe good for documentation), is if you have an ad blocker extension installed like uBlock or something then speculative loading will not work as these extensions disable speculative loading.

I truly hope you get a way to figure out if the user is using incognito mode and if so, don't do speculative loading.

@domenic
Copy link
Contributor

domenic commented May 8, 2024

  1. Speculative loading doesn't work on the Incognito/Private window.

We're working on fixing this in Chromium :). https://issues.chromium.org/issues/339223835

2. Another thing to keep in mind (maybe good for documentation), is if you have an ad blocker extension installed like uBlock or something then speculative loading will not work as these extensions disable speculative loading.

This is harder to fix, but this issue discusses some first steps we're considering taking on Chromium side toward maybe, eventually resolving this. https://issues.chromium.org/issues/335328446

@isaumya
Copy link
Author

isaumya commented May 8, 2024

Hi @domenic,
Thanks for the response and great to see that both of these issues are being worked on. The prefetch not working in incognito is a major one. As many people use incognito/private mode to browser web pages, I think the speculation rule of the same origin should be allowed whether using prefetch or prerender.

For the adblocker issue, I'm optimistic that some middle ground can be found but not fully sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants