I want using JavaScript to see if there is history or not
I mean if the forward button is available on the browser or not
How can I do it?
I want using JavaScript to see if there is history or not
I mean if the forward button is available on the browser or not
How can I do it?
Sorry I can't add a comment, but there's a good discussion in the following link: How to check if the user can go back in browser history or not which I think is very similar, and indicates that you can't.
Edit: The only way I found is calling history.forward()
and check if it returns undefined
, although obviously, it would move the user forward if it was possible, and this is probably not really effective depending on your use case!