Add parameters to the request on first page visit #794
-
Hello, I would like to persist a search between visits to a certain page, which is why I want to send the search parameters every time. I have stored the parameters in the localstorage, but I don't know how to append them on the initial loading of the page (that is, when I open a new tab and type in the link to the page). It works when I navigate to the tab that links to the page inside the website, since I can easily add the 'data' prop to InertiaLink components. But I don't know how to do it on the first visit. I am unsure if this is even possible right now. Any ideas are welcome. Thanks for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@KF42 Instead of using localStorage, I would recommend to store the data inside the backend session and share it as shared data. This way you can also set default data for the first visit or even maintain this, e.g. as per-user settings. |
Beta Was this translation helpful? Give feedback.
@KF42 Instead of using localStorage, I would recommend to store the data inside the backend session and share it as shared data. This way you can also set default data for the first visit or even maintain this, e.g. as per-user settings.