How to get users browsing history

Discussion in 'Javascript' started by Noodle, Sep 11, 2006.

  1. Noodle

    Noodle Guest

    Hi All,

    I know that document.referrer can be used to get the last page the user
    visited, but how can I get the page visited before that? Can this be
    done in JS?

    TIA
     
    Noodle, Sep 11, 2006
    #1
    1. Advertising

  2. Noodle

    RobG Guest

    Noodle wrote:
    > Hi All,
    >
    > I know that document.referrer can be used to get the last page the user
    > visited,


    You might think that gives you the last page visited, but it is very
    unreliable.

    If whatever UA I am using decides to give you a referrer, it might be
    the page that linked to your site or it could be whatever I told the UA
    to send you. If I have copied the link and pasted it, you'll get no
    referrer at all.


    > but how can I get the page visited before that? Can this be
    > done in JS?


    No. You can't access the browser history, all you can do is attempt to
    send the user backward or forward some count of links based on the
    history of the window or tab that the page has been opened in - which
    might not be the window that was used to navigate to the page.


    --
    Rob
     
    RobG, Sep 11, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charlie
    Replies:
    1
    Views:
    332
    Kevin Spencer
    Oct 27, 2004
  2. John Grandy

    command line to delete ie browsing history

    John Grandy, May 12, 2007, in forum: ASP .Net
    Replies:
    6
    Views:
    571
    Michael Nemtsev
    May 13, 2007
  3. Sam Stephenson
    Replies:
    1
    Views:
    229
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    2
    Views:
    303
    nutso fasst
    Oct 17, 2006
  5. Niall
    Replies:
    3
    Views:
    172
    Niall
    Dec 6, 2006
Loading...

Share This Page