By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,940 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

History.back and displaying information to a page

P: n/a
Is there a way to use the history.back to display the actual url of the last
page to the page ?
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
riotctrl wrote:
Is there a way to use the history.back to display the actual url of the last
page to the page ?

No.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2

P: n/a
riotctrl wrote:
Is there a way to use the history.back to display the actual url of the last
page to the page ?

No, but you can keep track of the url's of the pages that the user has
visited on *your* site. (document.referrer)
Mick
Jul 20 '05 #3

P: n/a
Mick White wrote:
riotctrl wrote:
Is there a way to use the history.back to display the actual url of
the last
page to the page ?

No, but you can keep track of the url's of the pages that the user has
visited on *your* site. (document.referrer)


document.referrer will only give you the last page, and it will only
give it to you then if you click a link to get there. Open somepage.html
in your browser, and then open someOtherPage.html from your favorites,
and someOtherPage.html's referrer will be empty. But, click the back
button, or history.go(-1), will take you back to the previous page.

You *might* be able to track all pages on your site with a cookie but I
seriously doubt it (that is, trying to maintain your own history trail).

Let the browser handle it, it has it built in.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.