Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V2] Protocol update: Partial reloads #370

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions resources/js/Pages/the-protocol.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,25 @@ export default function () {
optimization if it's acceptable that some page data becomes stale.
</P>
<P>
When a partial reload request is made, Inertia includes two additional headers with the request:{' '}
<Code>X-Inertia-Partial-Data</Code> and <Code>X-Inertia-Partial-Component</Code>.
When a partial reload request is made, Inertia includes the <Code>X-Inertia-Partial-Component</Code> header and
may include <Code>X-Inertia-Partial-Data</Code> and/or <Code>X-Inertia-Partial-Except</Code> headers with the
request.
</P>
<P>
The <Code>X-Inertia-Partial-Data</Code> header is a comma separated list of the desired props (data) keys that
should be returned.
</P>
<P>
The <Code>X-Inertia-Partial-Except</Code> header is a comma separated list of the props (data) keys that
should not be returned. When only the <Code>X-Inertia-Partial-Except</Code> header is included, all props (data)
except those listed will be sent. If both <Code>X-Inertia-Partial-Data</Code> and
<Code>X-Inertia-Partial-Except</Code> headers are included, the <Code>X-Inertia-Partial-Except</Code> header
will take precedence.
</P>
<P>
The <Code>X-Inertia-Partial-Component</Code> 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),
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.
</P>
<div className="overflow-hidden rounded" style={{ background: '#202e59' }}>
Expand Down