Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #39599

Re: Now that Google is going to remove cookies...

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Now that Google is going to remove cookies...
Date 2021-03-08 00:31 +0100
Organization PointedEars Software (PES)
Message-ID <1820186.taCxCBeP46@PointedEars.de> (permalink)
References <6ebeffb7-a16b-451b-8aea-bc382bf6f648n@googlegroups.com> <628cce56-386e-4c2a-84fe-14254f9ad784n@googlegroups.com> <20975921.EfDdHjke4D@PointedEars.de> <iahsfnFq0cmU1@mid.individual.net> <5gU0I.133417$zY.31899@fx36.iad>

Show all headers | View raw


Richard Damon wrote:

> On 3/6/21 12:29 PM, Arno Welzel wrote:
>> Thomas 'PointedEars' Lahn:
>>> Michael Haufe (TNO) wrote:
>>>> On Thursday, March 4, 2021 at 9:05:32 AM UTC-6, Groo Vee wrote:
>>>>> ...from Chrome, shouldn't the OTHER browsers also follow suit? Like
>>>>> BRAVE and Firefox? (Surely BRAVE should be the first, always saying
>>>>> that it's about privacy?). Is there any way to get word through to
>>>>> them??
>>>>
>>>> What does this have to do with JavaScript?
>>>
>>> If I am not mistaken, cookies have been a way to store information using
>>> JavaScript since JavaScript 1.0.
>> 
>> No, cookies are a way to store information, usually originally created
>> on the *server*. It has nothing to do with JavaScript. JavaScript can
>> just use cookies as well.
> 
> No, the cookie was a client size storage for a key to allow the
> stateless HTTP protocol to remember from one request to another.
> 
> An alternative to using the session cookie, was to add a session ID to
> the URL of links to provide the key.
> 
> Yes, most the information was stored server side, but the cookie
> provided a key to that.

Not quite.

There are actually two aspects of cookies:

  1. Storing information server-side:

     On HTTP request, create a server-side session with a session ID (using,
     and store all information server-side until the session expires.
     The information stored server-side is NOT called “cookie(s)”;
     see e.g. <https://php.net/setcookie> and cf.
     <https://www.php.net/manual/en/intro.session.php>.

  2. Storing information client-side:

     a) For a server-side session, store the session ID in a cookie
        client-side, by sending a HTTP response message containing a
        “Set-Cookie” header field.  On every suitable HTTP request,
        the client includes the session ID in the “Cookie” header field of
        the HTTP request message.

<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie>
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie>

     b) For a client-side (usually browser) session or for temporary storage
        that survives the end of a client-side session (given by the
        “expires“ value), store all the data in cookies client-side.  The
        client will transfer all relevant cookies to the server as described
        in a), but the data can also be exclusively used client-side.

Cookies can be read and set using the “document.cookie” property, unless 
they had been set with the “httponly” flag set.

<https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Now that Google is going to remove cookies... Groo Vee <groovee@cyberdude.com> - 2021-03-04 07:05 -0800
  Re: Now that Google is going to remove cookies... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-03-04 10:57 -0800
    Re: Now that Google is going to remove cookies... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-03-04 20:47 +0100
      Re: Now that Google is going to remove cookies... Arno Welzel <usenet@arnowelzel.de> - 2021-03-06 18:29 +0100
        Re: Now that Google is going to remove cookies... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-03-06 23:45 +0100
          Re: Now that Google is going to remove cookies... Arno Welzel <usenet@arnowelzel.de> - 2021-03-07 23:08 +0100
        Re: Now that Google is going to remove cookies... Richard Damon <Richard@Damon-Family.org> - 2021-03-06 18:30 -0500
          Re: Now that Google is going to remove cookies... Arno Welzel <usenet@arnowelzel.de> - 2021-03-07 23:09 +0100
          Re: Now that Google is going to remove cookies... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-03-08 00:31 +0100
            Re: Now that Google is going to remove cookies... Arno Welzel <usenet@arnowelzel.de> - 2021-03-08 09:50 +0100
              Re: Now that Google is going to remove cookies... John G Harris <niam@jghnorth.org.uk.invalid> - 2021-03-08 11:44 +0000
                Re: Now that Google is going to remove cookies... Arno Welzel <usenet@arnowelzel.de> - 2021-03-08 16:34 +0100
                Re: Now that Google is going to remove cookies... John G Harris <niam@jghnorth.org.uk.invalid> - 2021-03-09 18:17 +0000
    Re: Now that Google is going to remove cookies... Groo Vee <groovee@cyberdude.com> - 2021-03-05 20:13 -0800
      Re: Now that Google is going to remove cookies... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-03-06 07:45 -0800
  Re: Now that Google is going to remove cookies... Arno Welzel <usenet@arnowelzel.de> - 2021-03-06 18:35 +0100

csiph-web