Skip to content

Pages Router: client-side _next/data request deduplication not implemented #1464

Description

@james-elicx

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-22).

Problem

Tests assert that repeated navigations to the same gssp route should dedupe the underlying data fetch (hit: 1). vinext fires 10 separate requests (hit: 10). The Pages Router client router does not dedupe in-flight _next/data fetches when multiple navigations request the same payload concurrently.

Expected `hit: 1` after repeated navigation, received `hit: 10`

Estimated Impact

~1 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/getserversideprops/test/index.test.ts

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test that calls router.push('/page') 10x in quick succession and asserts only one _next/data request fires.

  2. Add an in-flight fetch map. Key in-flight _next/data fetches by URL and reuse the existing promise for any concurrent fetch of the same URL. Resolve all consumers from the single response.

  3. Layer on top of the existing _next/data endpoint. This complements closed issue Pages Router: _next/data JSON endpoint not implemented #1330 — endpoint exists, but the client now also needs dedup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions