Replies: 3 comments
-
I am not sure, but this line could be related: inertia/packages/inertia/src/router.ts Line 247 in dd59029 InertiaJS does cancel a visit if the previous visit was not yet completed (or canceled or interrupted). |
Beta Was this translation helpful? Give feedback.
-
I have a very similar problem. I'm developing an application where all the requests I make to the server are duplicated, where the first one is "cancelled", however, both are processed. |
Beta Was this translation helpful? Give feedback.
-
This is by design. Inertia follows similar patterns to a standard multi-page server-rendered app where if a user clicks a link and then quickly clicks another link, the first request is abandoned in favour of the latest one as the browser can only handle one "full page" request at a time. It's possible that the server has started processing the first request, but it won't be able to return a response as the browser has effectively hung up the call on its end. If you want to make simultaneous requests, you'll want to bypass Inertia's routing by making a standard XMLHttpRequest using Axios, etc. Essentially the same as you'd need to do in a standard server-rendered app where you can only have one active page navigation at a time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have this scenario in a Kanban board. The logic I came up with is that when a user drags a card from one column to another, both columns will issue a PUT request to update the order of each column.
Each column is rendered inside a Column component.
Therefore, each Column component issues a PUT request to the same route name but with different route params (column id).
On the DeveTools, however, I see the first request as canceled, and only the second passes through.
Is this by design? Or is it a browser thing?
Thanks
Bill
Beta Was this translation helpful? Give feedback.
All reactions