Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37914 > unrolled thread
| Started by | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| First post | 2019-12-04 15:28 -0800 |
| Last post | 2019-12-05 15:35 +0100 |
| Articles | 18 — 6 participants |
Back to article view | Back to comp.lang.javascript
Could i store settings in a cookie file? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-12-04 15:28 -0800
Re: Could i store settings in a cookie file? "R.Wieser" <address@not.available> - 2019-12-05 09:15 +0100
Re: Could i store settings in a cookie file? Julio Di Egidio <julio@diegidio.name> - 2019-12-05 00:26 -0800
Re: Could i store settings in a cookie file? Arno Welzel <usenet@arnowelzel.de> - 2019-12-06 08:26 +0100
Re: Could i store settings in a cookie file? Julio Di Egidio <julio@diegidio.name> - 2019-12-06 00:15 -0800
Re: Could i store settings in a cookie file? Arno Welzel <usenet@arnowelzel.de> - 2019-12-06 14:59 +0100
Re: Could i store settings in a cookie file? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-12-05 01:02 -0800
Re: Could i store settings in a cookie file? Julio Di Egidio <julio@diegidio.name> - 2019-12-05 01:18 -0800
Re: Could i store settings in a cookie file? Arno Welzel <usenet@arnowelzel.de> - 2019-12-05 15:32 +0100
Re: Could i store settings in a cookie file? Julio Di Egidio <julio@diegidio.name> - 2019-12-05 10:00 -0800
Re: Could i store settings in a cookie file? Arno Welzel <usenet@arnowelzel.de> - 2019-12-06 08:25 +0100
Re: Could i store settings in a cookie file? Daniele <webmaster@appliserver.com> - 2019-12-06 09:53 +0100
Re: Could i store settings in a cookie file? Julio Di Egidio <julio@diegidio.name> - 2019-12-06 01:07 -0800
Re: Could i store settings in a cookie file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-12-06 10:45 +0100
Re: Could i store settings in a cookie file? Arno Welzel <usenet@arnowelzel.de> - 2019-12-06 15:07 +0100
Re: Could i store settings in a cookie file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-12-06 17:05 +0100
[OT] Meaning of "plonk" (was: Re: Could i store settings in a cookie file?) Arno Welzel <usenet@arnowelzel.de> - 2019-12-06 15:04 +0100
Re: Could i store settings in a cookie file? Arno Welzel <usenet@arnowelzel.de> - 2019-12-05 15:35 +0100
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2019-12-04 15:28 -0800 |
| Subject | Could i store settings in a cookie file? |
| Message-ID | <6e6dcd6b-ae45-484a-9144-7c26dcb78a63@googlegroups.com> |
I have a client side script, are cookies dynamic?, can they be read and written by a client side script? If so could they be used to store settings for the script? "I know absolutely nothing about cookies".
[toc] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2019-12-05 09:15 +0100 |
| Message-ID | <qsaebm$1osh$1@gioia.aioe.org> |
| In reply to | #37914 |
Jonas, >I have a client side script, are cookies dynamic?, can they be read > and written by a client side script? If so could they be used to store > settings for the script? Yes, yes and yes. I guess you have not tried to google for "javascript cookie" yet ? Why ? The first result ( https://www.w3schools.com/js/js_cookies.asp ) seems to contain everything you need to know. Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-12-05 00:26 -0800 |
| Message-ID | <7aab9938-6a0d-4464-8765-ab37ed2011a4@googlegroups.com> |
| In reply to | #37916 |
On Thursday, 5 December 2019 09:15:59 UTC+1, R.Wieser wrote: > Jonas, > > >I have a client side script, are cookies dynamic?, can they be read > > and written by a client side script? If so could they be used to store > > settings for the script? > > Yes, yes and yes. > > I guess you have not tried to google for "javascript cookie" yet ? Why ? > > The first result ( https://www.w3schools.com/js/js_cookies.asp ) seems to > contain everything you need to know. Not really (indeed hardly w3schools ever contains everything that there is to know): it not only does not cover the whole spec, it is also messy about, and eventually lacking, the encoding/decoding of names and values. MDN is already better, although not even there you will find production-level code... Julio
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-06 08:26 +0100 |
| Message-ID | <h4ue4nFjnsrU2@mid.individual.net> |
| In reply to | #37918 |
On 05.12.19 09:26, Julio Di Egidio wrote: > On Thursday, 5 December 2019 09:15:59 UTC+1, R.Wieser wrote: >> Jonas, >> >>> I have a client side script, are cookies dynamic?, can they be read >>> and written by a client side script? If so could they be used to store >>> settings for the script? >> >> Yes, yes and yes. >> >> I guess you have not tried to google for "javascript cookie" yet ? Why ? >> >> The first result ( https://www.w3schools.com/js/js_cookies.asp ) seems to >> contain everything you need to know. > > Not really (indeed hardly w3schools ever contains everything that there is to > know): it not only does not cover the whole spec, it is also messy about, and > eventually lacking, the encoding/decoding of names and values. > > MDN is already better, although not even there you will find production-level > code... So it's time for YOU(!) to provide that and to show your expertise in this area. -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-12-06 00:15 -0800 |
| Message-ID | <7ef0626f-a34d-4d34-a3d3-ba9d90ba86b2@googlegroups.com> |
| In reply to | #37933 |
On Friday, 6 December 2019 08:26:21 UTC+1, Arno Welzel wrote: > On 05.12.19 09:26, Julio Di Egidio wrote: > > On Thursday, 5 December 2019 09:15:59 UTC+1, R.Wieser wrote: > >> Jonas, > >> > >>> I have a client side script, are cookies dynamic?, can they be read > >>> and written by a client side script? If so could they be used to store > >>> settings for the script? > >> > >> Yes, yes and yes. > >> > >> I guess you have not tried to google for "javascript cookie" yet ? Why ? > >> > >> The first result ( https://www.w3schools.com/js/js_cookies.asp ) seems to > >> contain everything you need to know. > > > > Not really (indeed hardly w3schools ever contains everything that there is to > > know): it not only does not cover the whole spec, it is also messy about, and > > eventually lacking, the encoding/decoding of names and values. > > > > MDN is already better, although not even there you will find production-level > > code... > > So it's time for YOU(!) to provide that and to show your expertise in > this area. And when is it going to be time that you stop fucking around? Julio
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-06 14:59 +0100 |
| Message-ID | <h4v55sFojgbU1@mid.individual.net> |
| In reply to | #37934 |
On 06.12.19 09:15, Julio Di Egidio wrote: > On Friday, 6 December 2019 08:26:21 UTC+1, Arno Welzel wrote: >> On 05.12.19 09:26, Julio Di Egidio wrote: >>> On Thursday, 5 December 2019 09:15:59 UTC+1, R.Wieser wrote: >>>> Jonas, >>>> >>>>> I have a client side script, are cookies dynamic?, can they be read >>>>> and written by a client side script? If so could they be used to store >>>>> settings for the script? >>>> >>>> Yes, yes and yes. >>>> >>>> I guess you have not tried to google for "javascript cookie" yet ? Why ? >>>> >>>> The first result ( https://www.w3schools.com/js/js_cookies.asp ) seems to >>>> contain everything you need to know. >>> >>> Not really (indeed hardly w3schools ever contains everything that there is to >>> know): it not only does not cover the whole spec, it is also messy about, and >>> eventually lacking, the encoding/decoding of names and values. >>> >>> MDN is already better, although not even there you will find production-level >>> code... >> >> So it's time for YOU(!) to provide that and to show your expertise in >> this area. > > And when is it going to be time that you stop fucking around? You just need to follow your own "plonks" and ignore my posts - problem solved. -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2019-12-05 01:02 -0800 |
| Message-ID | <66aa7c3b-7896-4986-bec5-ecf784fb0dc8@googlegroups.com> |
| In reply to | #37914 |
Den torsdag 5 december 2019 kl. 00:29:08 UTC+1 skrev Jonas Thörnvall: > I have a client side script, are cookies dynamic?, can they be read and written by a client side script? If so could they be used to store settings for the script? > > "I know absolutely nothing about cookies". Thanks for the links and answers, i was thinking that within my clientisde the cookie could store things like Default BPM, FPS, recording range, edit range, midi port configuratio, midi channel setting, sound patch setting, drum patch setting, andn that will save and load automatically with the script. Maybe even let the user create a cookie with name and push save settings to create it? And then dynamically read in and list the cookie names in a selection list, that could be pressed to load the setting file/cookie. Well maybe that is alot of programming, but i was thinking just listing them and read into array. Where each slot/element hold a certain parameter that will be read into variable. So maybe it is not that hard afterall.
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-12-05 01:18 -0800 |
| Message-ID | <abb5f20d-9da6-4a48-957d-bd87bf0e87ed@googlegroups.com> |
| In reply to | #37919 |
On Thursday, 5 December 2019 10:02:30 UTC+1, Jonas Thörnvall wrote: > Den torsdag 5 december 2019 kl. 00:29:08 UTC+1 skrev Jonas Thörnvall: > > I have a client side script, are cookies dynamic?, can they be read and written by a client side script? If so could they be used to store settings for the script? > > > > "I know absolutely nothing about cookies". > > Thanks for the links and answers, i was thinking that within my clientisde the cookie could store things like > > Default BPM, FPS, recording range, edit range, midi port configuratio, midi channel setting, sound patch setting, drum patch setting, andn that will save and load automatically with the script. Maybe even let the user create a cookie with name and push save settings to create it? > > And then dynamically read in and list the cookie names in a selection list, that could be pressed to load the setting file/cookie. > > Well maybe that is alot of programming, but i was thinking just listing them and read into array. Where each slot/element hold a certain parameter that will be read into variable. So maybe it is not that hard afterall. Yes, that's fine and dandy, just two cautions I would mention: - (To be safe) assume a limit of 1K on the amount of data you can store in a cookie. (If it is more data than that, sure you can then start using multiple cookies, but it eventually gets cumbersome: for more data or for more complex scenarios, you better go with "local storage". Anyway, most probably not your case here.) - I would suggest you keep this functionality at the bottom of the TODO list: first get a working product, the core functionality, then do as much (more!) clean-up and rationalisation as you can (being careful not to get into unneeded generalisation and/or optimisation), finally implement any "accessories"... HTH, Julio
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-05 15:32 +0100 |
| Message-ID | <h4sinqF85hkU1@mid.individual.net> |
| In reply to | #37914 |
On 05.12.19 00:28, Jonas Thörnvall wrote: > I have a client side script, are cookies dynamic?, can they be read > and written by a client side script? If so could they be used to > store settings for the script? > > "I know absolutely nothing about cookies". Cookies are usually send as header in an HTTP response and if the browser already has a cookie for a specific domain it will also send the cookie in the header with every HTTP request to the server. You can create, access or modify cookies using the document.cookie property: <https://www.w3schools.com/js/js_cookies.asp> -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-12-05 10:00 -0800 |
| Message-ID | <801a66c6-ccdd-4a41-8d15-d27cb179dddc@googlegroups.com> |
| In reply to | #37922 |
On Thursday, 5 December 2019 15:32:33 UTC+1, Arno Welzel wrote: > On 05.12.19 00:28, Jonas Thörnvall wrote: > > > I have a client side script, are cookies dynamic?, can they be read > > and written by a client side script? If so could they be used to > > store settings for the script? > > > > "I know absolutely nothing about cookies". > > Cookies are usually send as header in an HTTP response and if the > browser already has a cookie for a specific domain it will also send the > cookie in the header with every HTTP request to the server. > > You can create, access or modify cookies using the document.cookie property: > > <https://www.w3schools.com/js/js_cookies.asp> Back to square one... Congratulations. *Plonk* Julio
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-06 08:25 +0100 |
| Message-ID | <h4ue2tFjnsrU1@mid.individual.net> |
| In reply to | #37925 |
On 05.12.19 19:00, Julio Di Egidio wrote: [...] > *Plonk* Why do you constantly use things where you don't even understand what they mean? -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | Daniele <webmaster@appliserver.com> |
|---|---|
| Date | 2019-12-06 09:53 +0100 |
| Message-ID | <qsd4tt$lv4$1@dont-email.me> |
| In reply to | #37932 |
On 12/06/2019 08:25 AM, Arno Welzel wrote: > On 05.12.19 19:00, Julio Di Egidio wrote: > > [...] >> *Plonk* > > Why do you constantly use things where you don't even understand what > they mean? > > OT, but I must say it, it's too amusing. In Italy we have an idiomatic sentence: far cadere le palle. It means literally to cause the fall of the balls (=testicles). The meaning is: to be very bored/annoyed, (well it's difficult to me to explain in English) f.e. when you are explaining something very complicated to someone, thinking he's understanding you, and then he comes out with a comment or a question that clarifies that he has understood nothing or he knows nothing about what you are saying. Or when someone bother you with some long explanations, repeats always the same things etc. In those cases it's common to say "mi fa cadere le palle" or, and here is the point, mimic or allude to the noise that the falling balls are supposed to produce: a "plonk" is a good representation of it. I don't know if Di Egidio has something to do with Italy, apart the surname, but maybe his "plonk" has more to do with this interpretation than the classic usenet's one... Just to smile, folks!... Dan
[toc] | [prev] | [next] | [standalone]
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Date | 2019-12-06 01:07 -0800 |
| Message-ID | <40b42973-b784-4e68-bdc0-192e4ce40495@googlegroups.com> |
| In reply to | #37935 |
On Friday, 6 December 2019 09:53:23 UTC+1, Daniele wrote: > On 12/06/2019 08:25 AM, Arno Welzel wrote: > > On 05.12.19 19:00, Julio Di Egidio wrote: > > > > [...] > >> *Plonk* > > > > Why do you constantly use things where you don't even understand what > > they mean? > > > OT, but I must say it, it's too amusing. Is it? Then I am not sure we are from the same nation. > In Italy we have an idiomatic sentence: far cadere le palle. It means > literally to cause the fall of the balls (=testicles). To cause the balls to fall to the ground, meaning utter disappointment and annoyance. But no, despite that often goes with it, that is not the meaning of Plonk. I have explained the meaning of Plonk at least a couple of times around here: it goes ignored, the fuckers will just ask again the next time. Just my usage of it seems to remain cause of great disconcert. And in that, thanks for not helping, troll... *Plonk* Julio
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2019-12-06 10:45 +0100 |
| Message-ID | <XnsAB1D6D756D020eejj99@194.109.6.166> |
| In reply to | #37936 |
Julio Di Egidio <julio@diegidio.name> wrote on 06 Dec 2019 in comp.lang.javascript: > Just my usage > of it seems to remain cause of great disconcert. Yes, because on Usenet, "Plonk" has a fixed meaning fore decades. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-06 15:07 +0100 |
| Message-ID | <h4v5klFolmlU2@mid.individual.net> |
| In reply to | #37937 |
On 06.12.19 10:45, Evertjan. wrote: > Julio Di Egidio <julio@diegidio.name> wrote on 06 Dec 2019 in > comp.lang.javascript: > >> Just my usage >> of it seems to remain cause of great disconcert. > > Yes, because on Usenet, "Plonk" has a fixed meaning fore decades. Well - Julio Di Egidio uses Google Groups and I think he might not even know, what "Usenet" means and what an NNTP client or a kill file is. JFTR: Usenet is no realtime chat media and not all NNTP servers synchronize postings immediately but only once a day or only every couple of hours. -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2019-12-06 17:05 +0100 |
| Message-ID | <XnsAB1DADE405C8Beejj99@194.109.6.166> |
| In reply to | #37941 |
Arno Welzel <usenet@arnowelzel.de> wrote on 06 Dec 2019 in comp.lang.javascript: >> Yes, because on Usenet, "Plonk" has a fixed meaning fore decades. > > Well - Julio Di Egidio uses Google Groups and I think he might not even > know, what "Usenet" means and what an NNTP client or a kill file is. Well, I am not interested in presupposing in someone's aberant definition in a group discussion, especially when warned for and explained about again and again. It is like Boris Johnson talking about EU-citizens as being a minority in Britain, while nearly all British are EU-citizens. Presupposing aberant definitions seems dangerous to me. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-06 15:04 +0100 |
| Subject | [OT] Meaning of "plonk" (was: Re: Could i store settings in a cookie file?) |
| Message-ID | <h4v5fjFolmlU1@mid.individual.net> |
| In reply to | #37936 |
On 06.12.19 10:07, Julio Di Egidio wrote: [...] > I have explained the meaning of Plonk at least a couple of times around here: > it goes ignored, the fuckers will just ask again the next time. Just my usage > of it seems to remain cause of great disconcert. Again you demonstrate, that you do *not* understand, what "plonk" means in the context of Usenet posts. Maybe this can help you: <https://en.wikipedia.org/wiki/Plonk_(Usenet)> "Plonk is a Usenet jargon term for adding a particular poster to one's kill file so that poster's future postings are completely ignored. It was first used in 1989, and by 1994 was a commonly used term on Usenet." And as I think you don't believe Wikipedia - one of the referred sources there: <http://catb.org/~esr/jargon/html/P/plonk.html> "The sound a newbie makes as he falls to the bottom of a kill file." So - whatever explanation you take - the meaning is always the same: if you "plonk" someone, you indicate, that you will *IGNORE* further postings of that person. However - you seem to use "plonk" just to express your personal opinion and nothing else. -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2019-12-05 15:35 +0100 |
| Message-ID | <h4sit3F85hkU2@mid.individual.net> |
| In reply to | #37914 |
On 05.12.19 00:28, Jonas Thörnvall wrote: > I have a client side script, are cookies dynamic?, can they be read > and written by a client side script? If so could they be used to > store settings for the script? > > "I know absolutely nothing about cookies". In addition to my other response: I think DOM storage is the better solution for you: <https://developer.mozilla.org/en-US/docs/Web/API/Storage> -- Arno Welzel https://arnowelzel.de
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web