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

Do not preload links (with anchors) to same site I am already on #52

Closed
janpio opened this issue Dec 16, 2018 · 3 comments
Closed

Do not preload links (with anchors) to same site I am already on #52

janpio opened this issue Dec 16, 2018 · 3 comments

Comments

@janpio
Copy link

janpio commented Dec 16, 2018

I added quicklink to a play project of mine, https://ionic.zone.

On https://ionic.zone/content, I have a table of contents with loads of page internal links with an anchor (#anchor) to headlines below. It looks like quicklinks tried to preload all of those:

image

Wouldn't it make sense to not preload links to the page I am already viewing?

@addyosmani
Copy link
Collaborator

addyosmani commented Dec 17, 2018

One way to solve this is using the new ignores field which supports specifying a RegExp, Array or function of criteria to not prefetch URLs. You could set it to not prefetch any URLs with a anchor/fragment.

Related is #49

addyosmani added a commit that referenced this issue Dec 17, 2018
docs(README): add URL fragments note about ignores (#52, #49)
@addyosmani
Copy link
Collaborator

We've added a note in the docs around how to use ignores to ignore anchors and URL fragments that can now be found here https://github.com/GoogleChromeLabs/quicklink#custom-ignore-patterns. Hopefully that helps ❤️

@janpio
Copy link
Author

janpio commented Dec 17, 2018

Thanks. Can I limit that to the local domain? (So only # links for my own domain are ignored)

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