-
Notifications
You must be signed in to change notification settings - Fork 412
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
fix: prevent if link is URL fragment #49
Conversation
My gut reaction is that this should live within user // localhost:8000/#/hello
location.pathname = '/';
location.hash = '#/hello';
// localhost:8000/#/world
location.pathname = '/';
location.hash = '#/world'; Here, the hostname & pathnames are identical, but the unique hashes can actually be different pages – whether they're rendered dynamically thru Angular/Vue/Preact/etc. In this case, external prefetching is & should still be enabled. Including this logic into the core of |
@lukeed Oh I forgot about that, thanks! 😄 |
I'm tempted to agree with @lukeed that control over URL fragment behavior is something we should defer to the new My preference here would be that we document in the README how to use @arkist if you get a chance, would be awesome if you could try out using |
@addyosmani Okay I'll try later 👌 thanks! 😄 |
Hey @arkist, so you're right in that "localhost:8000/#/hello"
//=> fetched as "localhost:8080"
"localhost:8000/#/world"
//=> fetched as "localhost:8080"
"localhost:8000#hello"
//=> fetched as "localhost:8000"
"localhost:8000/demos/basic.html#3rdScreen"
//=> fetched as "localhost:8000/demos/basic.html"
"localhost:8000/demos/basic.html#2ndScreen"
//=> fetched as "localhost:8000/demos/basic.html" That said, I'm still not sure that this logic should belong within the core handler, as it would definitely also block querystring differences; eg: |
@lukeed woah, you're right 🤯 as you explained, my code could be a problem in that kind of querystring case. |
my last thought about treat URL fragment is |
Oh, I pressed the 'close PR' button by mistake 😅 |
Currently, quicklink trying prefetch even if link is just plain URL fragment.