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 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) 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 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
Archived
This topic is now archived and is closed to further replies.