How to Get the Previous URL or Pathname in Next.js? #68501
Unanswered
Sathyaraj-dev
asked this question in
App Router
Replies: 0 comments
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.
-
Hello All,
I'm looking for an efficient way to get the previous URL or pathname in a Next.js application. Specifically, I want to track the previous route before the current navigation. What would be the best approach to achieve this, either on the client side or server side? Any code examples or suggestions would be greatly appreciated.
Thanks,
Sathyaraj
Beta Was this translation helpful? Give feedback.
All reactions