question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link prerender is fetching twice; once on viewport, once for hover

See original GitHub issue

Bug report

Describe the bug

Link prerender is fetching twice; once on viewport, once for hover

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

yarn create next-app --example with-prefetching .
cd with-prefetching
yarn
yarn build
npx next export
npx serve out
  1. Navigate to localhost:5000
  2. Open devtools > network
  3. Hover over the Features hyperlink
  4. You will see a secondary fetch of the same URL for features.js

Expected behavior

One fetch only on viewport, as per docs and warnings

System information

  • OS: Windows
  • Browser: Chrome
  • Version of Next.js: 9.4.4
  • Version of Node.js: 12.16.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Timercommented, Jun 8, 2020

Are you sure “Disable cache” isn’t checked in your network inspector?

image

Also, the “second request” when present should be from prefetch cache, and not actually going to the network (this is the expected behavior): image

0reactions
balazsorban44commented, Jan 30, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

prefetch prerender multiple pages on hover - Stack Overflow
Chrome/IE/Edge allows prerendering of one page per window (please, note that it isn't a tab), it means the second prerender hint is ignored....
Read more >
Prerender on hover? - CSS-Tricks
This is another player in the game of (pre)rendering the page of the link that you're about to click on before you click...
Read more >
Caniuse test page
Feature Unprefixed tests Prefixed tests Text API for Canvas. Auto(m). Modernizr test for: "canvastext" CSS Appearance. Auto. appearance: none; property stays Auto. appearance... CSS Container Queries...
Read more >
Updates - React PDF Viewer
Keep the current page after rotating the document. Fix bugs that might happen with a document whose pages have different dimensions. Clicking a...
Read more >
Source: openseadragon.js
The key is a {@link BROWSERS} value, and the value is one of {@link ... to true to force the image to wrap...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found