Next.js: It seems that `router.prefetch` is not working properly

Created on 15 Aug 2020  ·  2Comments  ·  Source: vercel/next.js

Bug report

Describe the bug

  • I wrote the code below and ran router.prefetch, but when I go to the /new/my-feed/terms-of-service page, download files again.(Please refer to the screenshot below.).
useEffect(() => {
   Router.prefetch('/new/my-feed/terms-of-service');
}, []);

Expected behavior

  • It should not re-download the files when move to the /new/my-feed/terms-of-service page

Screenshots

스크린샷 2020-08-15 오후 10 34 30

System information

  • OS: macOS
  • Browser (if applies) Chrome
  • Version of Next.js: 9.3.4
  • Version of Node.js: 10.21.0

Most helpful comment

It seems that you have disabled the browser cache ...

All 2 comments

It seems that you have disabled the browser cache ...

@AliasT Oh, thanks! You're right!
I solved this issue

스크린샷 2020-08-16 오전 1 18 02

Was this page helpful?
0 / 5 - 0 ratings

Related issues

havefive picture havefive  ·  3Comments

pie6k picture pie6k  ·  3Comments

renatorib picture renatorib  ·  3Comments

knipferrc picture knipferrc  ·  3Comments

irrigator picture irrigator  ·  3Comments