Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: about cookies

  1. #1
    New Coder
    Join Date
    Jan 2004
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    about cookies

    I am wondering about how the cookies are saved by system: How to name the cookies file and where to save it?
    It should be saved on the client side, right? And the fold to save seems to be"C:\Documents and Settings\username\Cookies". I don't know if the information of the cookies will also be saved somewhere else.

    How different *.html files to share the same cookie?

    Thank you in advance!

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    How they are named and how they are stored on your harddrive is up to the browser. The functionality is as follows:

    - Cookies are limited to one domain. There is a limit of 20 cookies per domain. Cookies can be read only from pages from that domain.
    - Cookies can further be limited by paths, so that only pages with a specific path on that domain may read the cookie.
    - Cookies have an expiry date. If no such date is set, they will only survive as long as the browser session is still running.
    - Cookies that pass the expiry date are removed, but not necessarily from your harddrive. It depends on how yourbrowse rstores them.
    - Cookies may be 4kb long each, name of the cookie included.
    - Your max limit is no smaller than 300 cookies in total.
    - Most browsers allow no longer expiry time than three years. Some have a 90 day limit even.

    Netscape store all it's cookies in one file. Microsoft stores one file per cookie, in the Temporary Internet Files directory or in a specific subdirectory to the user directory under Documents and Settings. This is OS and browser version dependent, and pretty uninteresting except for the cases where you want to remove a specific cookie from your system. The important data is all within the cookie itself.
    Last edited by liorean; 01-16-2004 at 11:14 AM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Mar 2003
    Posts
    241
    Thanks
    0
    Thanked 0 Times in 0 Posts
    - Cookies may be 4kb long each, name of the cookie included.
    Hmm, I used the search engine @ these boards and it is a bit unclear to me if the statement above is true or not; some older posts were saying that the total size for a domains cookies can be max 4 kb and not 4 kb each.

    Which is true ?


    Is there some kind of general cookie-specification out there, I searched the w3c.org through google but I could not find anything.

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    But you didn't search these forums good enough, it seems. This is a match on the words 'cookie' and 'spec':

    <http://codingforums.com/showthread.p...threadid=31146> addresses just what you are asking about, and <http://codingforums.com/showthread.p...threadid=17304> also mentions it.
    Last edited by liorean; 01-27-2004 at 03:51 PM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #5
    Regular Coder
    Join Date
    Mar 2003
    Posts
    241
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, the first link I had only been to, but I thought it concerned NS only, the second thread seems to be much better [to me], thanks

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    The first thread to be picky concerns NN only, yes. However, that is the spec that everyone goes after, because Netscape were the ones that brought this technology together. While Netscape were the de facto standard, they were also the ultimate source for information and specifications. Ie5 was the browser that changed things from that state, but how cookies work were already set in stone by then. Note that cookie part of the RFC is built based on the Netscape cookie spec, and that Netscape were one of the two companies writing the RFC.
    Code:
    Network Working Group                                         D. Kristol
    Request for Comments: 2109        Bell Laboratories, Lucent Technologies
    Category: Standards Track                                    L. Montulli
                                                     Netscape Communications
                                                               February 1997
    (The "Standards Track" category means it is a summary and formalisation of de facto standards.)
    Last edited by liorean; 01-27-2004 at 07:17 PM.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

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