Skip to content

Commit 9d38e5b

Browse files
committed
Docs: update partial reloads protocol
inertiajs/inertiajs.com#370
1 parent aadce4f commit 9d38e5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/guide/the-protocol.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ X-Inertia-Location: http://example.com/events/80
117117

118118
When making Inertia requests, the partial reload option allows you to request a subset of the props (data) from the server on subsequent visits to the same page component. This can be a helpful performance optimization if it's acceptable that some page data becomes stale.
119119

120-
When a partial reload request is made, Inertia includes two additional headers with the request: `X-Inertia-Partial-Data` and `X-Inertia-Partial-Component`.
120+
When a partial reload request is made, Inertia includes the `X-Inertia-Partial-Component` header and may include `X-Inertia-Partial-Data` and/or `X-Inertia-Partial-Except` headers with the request.
121121

122122
The `X-Inertia-Partial-Data` header is a comma separated list of the desired props (data) keys that should be returned.
123123

124-
The `X-Inertia-Partial-Component` header includes the name of the component that is being partially reloaded. This is necessary, since partial reloads only work for requests made to the same page component. If the final destination is different for some reason (eg. the user was logged out and is now on the login page), then no partial reloading will occur.
124+
The `X-Inertia-Partial-Except` header is a comma separated list of the props (data) keys that should not be returned. When only the `X-Inertia-Partial-Except` header is included, all props (data) except those listed will be sent. If both `X-Inertia-Partial-Data` and `X-Inertia-Partial-Except` headers are included, the `X-Inertia-Partial-Except` header will take precedence.
125+
126+
The `X-Inertia-Partial-Component` header includes the name of the component that is being partially reloaded. This is necessary, since partial reloads only work for requests made to the same page component. If the final destination is different for some reason (e.g. the user was logged out and is now on the login page), then no partial reloading will occur.
125127

126128
```http
127129
REQUEST

0 commit comments

Comments
 (0)