next-pwa icon indicating copy to clipboard operation
next-pwa copied to clipboard

root path requested twice

Open PlopTheReal opened this issue 2 years ago • 2 comments

The root path is requested twice (see the screenshot). Other paths aren't (ie /whatever).

Versions

  • next-pwa: 5.4.7
  • next: 12.1.4

Expected Behaviors

The root path is requested once.

Screenshots

image

PlopTheReal avatar Apr 14 '22 21:04 PlopTheReal

Configure dynamicStartUrl to false. image

shadowwalker avatar Apr 16 '22 23:04 shadowwalker

Thanks, this solve the double request but I got another side effect. When the user hit the root path that increase some user statistics (like hit count) but now it seems to skip this logic entirely. I presume that's because it's cached and doesn't hit the server on subsequent requests. How can I prevent the dupplicated requests while still hitting the server on each requests on root?

PlopTheReal avatar Apr 19 '22 08:04 PlopTheReal