SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting the url of the previous page

    I'm new to Javascript but did manage to find code that would produce a "Back" button that would take a user to a previous page but what I need is the actual url of the previous page. It doesn't look do able from my research so far since all the history related javascript functiions don't read the history, they just go there. Is there any way to read the history or to get the url of the previous page?

    I'm starting to build a "social network" type php script where users simply save a url of the page they are on on my site in a manner similar to bookmarks. It doesn't seem that tough, at least for the lite version I am thinking about but this previous url thing has me stumped before I even got started.

  2. #2
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.referrer


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
  •