Open markedwards opened 3 months ago
That codesandbox link is unreachable.
I can confirm this issue. Its easy to try out just make a server action with a redirect in it and pass RedirectType.replace and the redirect happens correctly but it did no replace because the full browser history is still available, I am having this issue with the latest version, I read about it on stackoverflow where people were talking about this that the RedirectType has no effect in in server actions
Could you make a stackblitz example? just type next.new
in your browser URL search bar, setup the repro and post the link back to it.
Sorry, somehow managed to get the incorrect codesandbox URL originally (fixing in the description).
This should work: https://codesandbox.io/p/devbox/epic-kowalevski-y6ghc9
Is that sufficient?
I confirm the issue
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/epic-kowalevski-y6ghc9
To Reproduce
/foo
pushed to it, and it is possible to go back to/
Current vs. Expected behavior
I expect
/foo
to replace the root/
page. According to this documentation:However, the behavior is that push is always forced in server actions, and there's no ability to override.
Provide environment information
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response