Skip to content

Requests for __data.json should be skipped entirely when possible #6201

@Conduitry

Description

@Conduitry

Describe the bug

Re-running server-side load on each navigation is supposed to be skipped now (unless the load function depends on url etc.), but this does not appear to be fully working. Even if a given page has no +page.server.js file, the browser is still making requests to __data.json on each navigation, which return things like {"type":"data","nodes":[{"type":"skip"},null]} - the root (layout) node is skipped, and the leaf (page) node has no data. Requests that would tell the server to skip all of the nodes for which there are no .server.js files should be skipped entirely.

Reproduction

https://github.com/Conduitry-Repros/kit-6201

Logs

No response

System Info

System:
    OS: Linux 5.10 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 8.34 GB / 12.32 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Yarn: 1.22.19
    npm: 8.15.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.65 
    @sveltejs/kit: next => 1.0.0-next.431 
    svelte: ^3.44.0 => 3.49.0 
    vite: ^3.0.4 => 3.0.9

Severity

serious, but I can work around it

Additional Information

This is the situation I referred to in #6056 (comment) - it seems like it was not correctly (or fully?) handled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingload / layoutp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions