I want to get url of previous page when some user has clicked browser back button and is redirected to previous page. jquery or rails
Asked
Active
Viewed 2,464 times
0
-
1Answer of your question is here: http://stackoverflow.com/questions/3528324/how-do-you-get-the-previous-url-in-javascript – Kunj Dec 31 '13 at 12:05
-
1Please try to be polite. – Billy Chan Dec 31 '13 at 12:20
1 Answers
0
Have a look to this StackOverflow answer.
I think you just have to use this jQuery code :
$("#backLink").click(function(event) {
event.preventDefault();
history.back(1);
});
where #backlink is the selector of your button.

Community
- 1
- 1

Lucas Willems
- 6,673
- 4
- 28
- 45