SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Back button urls

    Helo. For Firefox I need to reference to the urls of links that reside in back button pop-up list. Is it possible to refer to them? I wiil use them for greasemonkey scripts.

    Thanks in adbance.

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well all the URLs are referenced by history.go(x) . Here x is the number of back level you want to go. That means, -1 will be the latest URL in the back history. -2 will be two URLs back and so on.

    this can be used like:
    <a href="javascript:void(null)" onclick="history.go(-1);">Go back</a>

    Hope it helps.

  3. #3
    SitePoint Addict
    Join Date
    May 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much. But I cant alert the urls appropriately (below code). Is it possible to retrieve them as strings?

    alert(history.go(-1));

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, big time security vulnerability. There are hacks that can get a few domains from your history, but thats about it http://jeremiahgrossman.blogspot.com...l#whereyoubeen


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •