javascript:window.history.go(-(window.history.length-1));
However I am experiencing a problem or two:
- If I use a number of pages to go back that is greater than the number of the page that I am on then nothing happens
If I have gone to a depth of say 5 pages then back a couple (ie. the history shows a list of 5 pages and I am on the third) then window.history.length returns 5 rather than 3 and I try and go back too many pages and nothing happens
Is there a way of finding the position of ones current page in the history rather than the total number of pages ?
Is there a way of saying to go back as many pages as one can and ignoring the fact that one has asked to go back more pages than there are in the history ?