A
Alec S.
Hi,
I'm using JavaScript and Cookies for some customization in a web page.
There may be several values in the cookie with names that are not known at
runtime. I need a way of deleting them.
For example, if my site is www.test.com and the cookie contains:
label1
fob
....
*
name1
foo
....
*
name2
bar
....
*
name3
baz
....
*
and so on, then I would write a function that simply deletes these values
with a loop that counts off name1, name2, name3, et cetera. Unfortunately
my cookie will use different labels, not name1, name2, name3..., in fact I
have no way of knowing exactly what they will be called beforehand although
they will have some things I can predict.
Can I use wildcards in the value-name, eg. in the above example, could I
delete "name*" or "*1"? Alternatively, is there a way to just delete ALL
values in the cookie?
Thanks.
I'm using JavaScript and Cookies for some customization in a web page.
There may be several values in the cookie with names that are not known at
runtime. I need a way of deleting them.
For example, if my site is www.test.com and the cookie contains:
label1
fob
....
*
name1
foo
....
*
name2
bar
....
*
name3
baz
....
*
and so on, then I would write a function that simply deletes these values
with a loop that counts off name1, name2, name3, et cetera. Unfortunately
my cookie will use different labels, not name1, name2, name3..., in fact I
have no way of knowing exactly what they will be called beforehand although
they will have some things I can predict.
Can I use wildcards in the value-name, eg. in the above example, could I
delete "name*" or "*1"? Alternatively, is there a way to just delete ALL
values in the cookie?
Thanks.