In my current project we are using the Sammy.js framework for navigation. For a requirement I need to know whether a given route was run as a response of pressing the Back/Forward button or not.
Is there a way to identify that?
In my current project we are using the Sammy.js framework for navigation. For a requirement I need to know whether a given route was run as a response of pressing the Back/Forward button or not.
Is there a way to identify that?
You can't know that precisely. All you can find out is wether the navigation event was received from inside the application (click on a link handled by Sammy, form submited , action in your JS ...) or if the navigation event came from the "outside" Back Button, Forward button, change in the URL bar, ...