Results 1 to 2 of 2

Thread: Cookie Redirect

  1. #1
    Join Date
    Jul 2005
    Location
    Oregon, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Cookie Redirect

    This address: (http://javascript.internet.com/cooki...-redirect.html) is cookie redirect scipt. Onclick=setting cookie.

    This address: (http://www.perlscriptsjavascripts.co..._redirect.html) is cookie redirect script. setcookie=seenit. (redirect if I have been here before)

    The scripts above aren't work for me.
    This is something I wanted.

    EXAMPLE BELOW:

    index.html = main page (content: <A href="english.html" target="inframe_page">English</A> | <A href="vietnam.html" target="inframe_page">Vietnamese</A>

    ifrm.html = inframe_page
    english.html = english page
    vietnam.html = vietnamese language page

    When a visitor first time visit my website, the would see the ifrm.html (inframe_page). But if s/he come back later, s/he won't see the ifrm.html page because I wnat it automatic redirect to english.html or vietnam.html depending on where s/he been last time (last visit) [last visit=setcookie]

    Information: Can I set the page: setcookie by onclick in different page (index.html)
    Or setcookie by unload the ifrm.html
    Or setcookie by onload the english.html and/or vietnam.html

    The information above may confuse you, please contact me or reply if you don't get it. That's all I can explain, because my English is limited. I hope someone can help me.

    THANK THANK VERY MUCH! AND HOPE YOU HAVE A NICE DAY :-)

    Hung!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Javascript cookies are unreliable due to a variety of reasons. Not the least of which are the user's ability to delete and/or refuse them and some browsers' refusal to set them (or do much of anything) onunload. Something server side would be better.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •