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

Defer prefetching after onload #5734

Closed
rauchg opened this issue Nov 22, 2018 · 2 comments · Fixed by #5737
Closed

Defer prefetching after onload #5734

rauchg opened this issue Nov 22, 2018 · 2 comments · Fixed by #5737
Assignees

Comments

@rauchg
Copy link
Member

rauchg commented Nov 22, 2018

Per suggestion of @cramforce, we should only start pre-fetching after onload triggers (unless onload has already triggered ;)).

This will prevent the tab spinner from rendering until we've prefetched all linked pages (via <Link prefetch> for example).

@rauchg
Copy link
Member Author

rauchg commented Nov 22, 2018

It seems that we are not using <link rel="preload"> as the implementation detail of Router.prefetch?

timneutkens added a commit to timneutkens/next.js that referenced this issue Nov 23, 2018
timneutkens added a commit that referenced this issue Nov 24, 2018
* Use <link rel=“prefetch”> for prefetching

Fixes #5734

* Fix unit tests for router

* Add test for prefetch

* Rename test

* Check all logs for message
@cramforce
Copy link
Contributor

Neat, left a couple comments on the merged PR.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants