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

Prefetching #246

Open
janat08 opened this issue May 25, 2022 · 3 comments
Open

Prefetching #246

janat08 opened this issue May 25, 2022 · 3 comments
Labels
question Further information is requested

Comments

@janat08
Copy link

janat08 commented May 25, 2022

If prefetching is supported, is there a programmatic way to begin prefetching pages? Frameworks like gatsbyjs demand that you delineate links that shouldn't be prefetched.

@eight04
Copy link
Contributor

eight04 commented Jul 5, 2022

Elderjs does generate prefetch directives for component scripts/data.

string: `<link rel="prefetch" href="${component.client}" as="script">`,

It doesn't prefetch links on the page.

@janat08
Copy link
Author

janat08 commented Jul 9, 2022

Server side frameworks would use something like turbolinks to begin prefetching on hover, is there something like it from SPA or elderjs? Elderjs isn't spa right, so prefetching links as if they're server served would work?

@eight04 eight04 added the question Further information is requested label Nov 4, 2022
@eight04
Copy link
Contributor

eight04 commented Nov 4, 2022

Elderjs is not a SPA framework. It generates static site, which only includes static page, scripts, and styles.

So yes, prefetching links should work if the browser/server cache is configured correctly.

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

No branches or pull requests

2 participants