Back Links

liunx

Guest
Anyone have a script or example of how to achive this,<br />
<br />
I would like to have a set of links on my page that would enable the user to jump back 1 or more levels as they navigate.It would look something like this:<br />
<br />
Main >> Graphics >> JPG >> Animated<br />
<br />
Where each word would be a link back to the previous level and the last one would represent the current page. For example a person could go from Animated back to graphics in 1 click.<br />
<br />
The javascript:history.back()" exits the page.<!--content-->You can't do it automatically*.<br />
Well, not easily anyway**.<br />
<br />
The browser doesn't expose much of the history object. All you get is the length, and a few methods (forward(), back(), go() ). You can't ask the browser for, say, the contents of history[2].<br />
Privacy is the reason behind this: if it were possible then sites could build up a pretty good profile on you by examining your browser's history.<br />
<br />
* You can do it manually by including some HTML on each page which shows whereabouts in the site map the user is at the moment. This wouldn't show how they got there though.<br />
<br />
** If you were really keen, you could construct a site-local stack of the history pages using, say, a cookie. Whenever a page loaded it could push its address onto the end of the cookie, when the user clicked on a link it could pop that address off the cookie and then navigate to that page.<br />
Very messy.<!--content-->No need for any javascript just make main.html, graphics.html, jpg.html, animated.html and go back to those.<!--content-->
 
Back
Top