dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: question about Cookie

  1. #1
    Join Date
    Jun 2009
    Posts
    97

    question about Cookie

    If I am setting a cookie, that means php program will create a cookie on client side in some file. This cookie will be in form of some text.
    If same php program is executed for different requests from different clients, then will the same cookie be created for all different clients ? By that I mean , will all users have same cookie on their computers ?

    If not, then how is that possible ? Because its the same program which is executed and creates cookie, which should be of same value for all clients.

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,617
    It will have the same value for each client if that's what you respond with to each request, and the client's settings are configured to accept cookies from that domain. (Almost all will at least accept cookies from the same sub-domain.domain as that to which the originating HTTP request was made, but those settings are all user configurable at the client side.) As to how exactly they are stored on each client computer, that's entirely up the the client application (browser) and any configuration options that might apply to it (perhaps it encrypts or compresses them in some way?).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Oct 2012
    Posts
    13
    It will surely have the same value.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles