vercel / next.js

The React Framework

Home Page:https://nextjs.org

Repository from Github https://github.comvercel/next.jsRepository from Github https://github.comvercel/next.js

Parallel routes create very large request payload

hamidrezahanafi opened this issue · comments

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/ancient-tree-q99l5x

To Reproduce

  1. start the application at https://q99l5x-3000.csb.app/
  2. Click on Go to filters
  3. Then click on Go to filters 2
  4. Check the next-router-state-tree on list of headers

Current vs. Expected behavior

Current, for each parallel route we append the url and search parameters multiple times, which make it very very large request payload when there are many search parameters present e.g selecting multiple filters, this large payload is out of bounds for some servers

Expected, when not using parallel routes, it's only repeated once per page and request payload is much smaller

I attached an example json of the next-router-state-tree
parallel-routes.json

Provide environment information

Node.js v22.13.1

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:22 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6041
  Available memory (MB): 49152
  Available CPU cores: 14
Binaries:
  Node: 22.13.1
  npm: 10.9.2
  Yarn: 4.8.1
  pnpm: N/A
Relevant Packages:
  next: 15.2.3
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Route Groups

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response