Cookies

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon B. Nielsen

    Cookies

    Is it possible for me to set a cookie from MyDomain1.com and then read that
    same cookie from MyDomain2.com?


  • Martin Honnen

    #2
    Re: Cookies



    Simon B. Nielsen wrote:
    [color=blue]
    > Is it possible for me to set a cookie from MyDomain1.com and then read that
    > same cookie from MyDomain2.com?[/color]

    No, you can set a cookie from host1.domain.tl d with
    document.cookie = 'cokieName=' + escape(cookieVa lue) +
    '; domain=domain.t ld'
    and then read it from host2.domain.tl d


    --

    Martin Honnen


    Comment

    • rf

      #3
      Re: Cookies


      "Simon B. Nielsen" <simon@webplane t.dk> wrote in message
      news:uBUdb.1073 94$Kb2.3974476@ news010.worldon line.dk...[color=blue]
      > Is it possible for me to set a cookie from MyDomain1.com and then read[/color]
      that[color=blue]
      > same cookie from MyDomain2.com?[/color]

      Not unless you change the security settings in your browser. You can't do it
      on my system.

      Cheers
      Richard.


      Comment

      • Randell D.

        #4
        Re: Cookies


        "Simon B. Nielsen" <simon@webplane t.dk> wrote in message
        news:uBUdb.1073 94$Kb2.3974476@ news010.worldon line.dk...[color=blue]
        > Is it possible for me to set a cookie from MyDomain1.com and then read[/color]
        that[color=blue]
        > same cookie from MyDomain2.com?
        >
        >[/color]
        From MyDomain1.com, set a cookie for MyDomain2.com - I believe you can
        write, but not read to someone else's domain name... thus by having a script
        executed from MyDomain1.com and planting it at MyDomain2.com - you should
        then be able to use code on MyDomain2.com to read MyDomain2.com cookies...

        I'm not certain of this, but believe the 'rule' to be that you have no read
        access to another domains cookies - I don't believe there is a problem to
        createing a cookie for a domain any domain.


        Comment

        Working...