Replies: 1 comment 2 replies
-
You can check the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In a loader or action function, is there any built-in way to differentiate between requests that came from the client (via AJAX) and those that came from the server during SSR?
We have a use case where we'd like to cache a few things on the frontend so we don't have to run multiple graphql queries every time the page re-renders on the client. But if someone refreshes the page or goes to the URL directly, then we need to run all the queries to restore the state.
If this isn't a built-in feature, is there a way to add a custom header to either the server-side requests or client-side requests to the loaders so we can tell them apart?
Beta Was this translation helpful? Give feedback.
All reactions