Script to save iframe source (cookie?)

Discussion in 'Programming' started by dean2009, Jul 16, 2010.

  1. #1
    hi,

    i would be very very grateful if someone can help me out here.

    i a iframe on my webpage, who's src location if the same domain. as in my other page under the same domain.

    what i'd like to do is when a visitor leaves my site, i want the src of the iframe to be saved and when the same visitor visits the site. that last src will load within that iframe.

    is this possible.

    many many thanks.
     
    dean2009, Jul 16, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Yes, it should be possible with cookies :) It's possible with either PHP or javascript, though I haven't personally tried it with javascript, it should be possible.
     
    Rainulf, Jul 16, 2010 IP
  3. TheSal

    TheSal Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    use cookies. if you have user login, you can use it to store the last visted page in your date base too.
     
    TheSal, Jul 17, 2010 IP
  4. longcall911

    longcall911 Peon

    Messages:
    1,672
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You would need a script to write the cookie and to then read it on the visitior's return. This is simple, easy, basic stuff for any web programming language. But cookies can be deleted, and users may use different computers. So if the site is dynamic and the user signs in, it it best to put his last visit info in a database and then read it when he signs back in.
     
    longcall911, Jul 18, 2010 IP