dreamwest Posted January 5, 2009 Share Posted January 5, 2009 Just wanted to share the best javascript for page history return. A lovely and simple line anyone can remember: <a href="javascript:history.go(-1);">previous page</a> You can set this to return to any page the user has previously browsed set "(-1)" to how far back you want the hyperlink to take you Quote Link to comment https://forums.phpfreaks.com/topic/139488-go-back-to-any-page-tip/ Share on other sites More sharing options...
Psycho Posted January 5, 2009 Share Posted January 5, 2009 Um, okay . . . That's a pretty well known JavaScript function. You can also go forward in the browser history using a positive integer (assuming the user, or javascript, has gone back in the history) Quote Link to comment https://forums.phpfreaks.com/topic/139488-go-back-to-any-page-tip/#findComment-729774 Share on other sites More sharing options...
dreamwest Posted January 5, 2009 Author Share Posted January 5, 2009 Um, okay . . . That's a pretty well known JavaScript function. You can also go forward in the browser history using a positive integer (assuming the user, or javascript, has gone back in the history) yeah. i was using php code to tell where the user came from.....this is simpler though Quote Link to comment https://forums.phpfreaks.com/topic/139488-go-back-to-any-page-tip/#findComment-729818 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.