+ Reply to Thread
Results 1 to 4 of 4

Thread: Document Referrer

  1. #1
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Document Referrer

    I'm trying to confirm how document.referrer is working. Let's say that a user enters the site on PageA. There is then a link on PageA to take user to PageB and then a link to pageC and then PageD. Deep Breath;

    So:
    Code:
    ......-> pageA (referrer NULL) [but can we count on this?]
    PageA -> PageB (referrer PageA)
    PageB -> PageC (referrer PageB)
    PageC -> PageD (referrer PageC)
    
    Now, from PageD, user presses the browser back button to return to PageC. In this case, I'm seeing document.referrer return PageB. I assume this to be correct (I would not expect it to be PageD, but perhaps NULL).

    I'm trying to process some data we have from JS, but the developer is long gone as well as the souce -- it's very much like trying to fix my car by watching traffic go by.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  2. #2
    Ask Me About Dragons :D Shadow Wizard has a spectacular aura about Shadow Wizard has a spectacular aura about Shadow Wizard's Avatar
    Join Date
    Jul 2008
    Location
    Israel
    Posts
    795
    Blog Entries
    2
    Real Name
    Yahav
    Rep Power
    5

    hey is this relevant or did you already solve this or found alternative?
    if still relevant, I don't really understand what is the problem or what you're asking.. you try to identify is the user clicked the Back button by reading the referrer?

  3. #3
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    2,386
    Blog Entries
    5
    Real Name
    Wolff
    Rep Power
    15

    Hey Shad!

    I figured this out by experiment. Indeed, pressing the BACK button does NOT update the value of document.referrer -- which is what I expected. If however I have a BACK link, then it's updated. This is exactly what I expected, but not what the application purported to do.
    Wolffy
    .-- ----- ..-. ..-. -.--
    Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.

  4. #4
    Ask Me About Dragons :D Shadow Wizard has a spectacular aura about Shadow Wizard has a spectacular aura about Shadow Wizard's Avatar
    Join Date
    Jul 2008
    Location
    Israel
    Posts
    795
    Blog Entries
    2
    Real Name
    Yahav
    Rep Power
    5

    I see.. thanks for sharing mate!

+ Reply to Thread

Similar Threads

  1. .aspx page returning XML formatted document
    By richyrich in forum .NET Development
    Replies: 0
    Last Post: July 2nd, 2009, 08:46 PM
  2. Enabling / Disabling Document Map
    By harish in forum SQL Server Reporting Services Help
    Replies: 1
    Last Post: May 14th, 2009, 07:34 AM
  3. Returning XML document from Web Service
    By richyrich in forum .NET Development
    Replies: 8
    Last Post: April 17th, 2009, 09:24 AM

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

SEO by vBSEO