PDA

Click to See Complete Forum and Search --> : Cookies in JS


GamerMax5
Jan 7th, 2005, 07:23 AM
I know how to write a cookie in JS but how do you get it to save to the computer?

Acidic
Jan 7th, 2005, 07:35 AM
Cookies are automatically saved in the cookies directory.

GamerMax5
Jan 7th, 2005, 07:42 AM
:mad: I know that but I wrote the cookie and the cookie is supposed to save when the user clicks on the save data button. Well I clicked on it and I checked the directory and it wasn't there but then I wrote a JS program that checks for any available cookies on your computer and it was there. Then I ran a find and it couldn't find it! ***???!!!


EDIT: Are there such things as static cookies

Acidic
Jan 7th, 2005, 08:30 AM
hat would a static cookie be? There is only cookies and not cookies, no grey area. When you save it, it doesn't havea file name of the cookie name. IE cookies are at:
C:\Documents and Settings\Owner\Cookies
FF stores them in:
C:\Documents and Settings\Owner\Application Data\Mozilla\Firefox\Profiles\bskpkvop.default\cookies.txt
(change those to suit your username)

GamerMax5
Jan 7th, 2005, 11:02 AM
By static, I meant that they act like RAM; it gets deleted when you turn the computer off. But after asking my teacher, they don't exist.

I run IE. I checked the folder but it wasn't there. I might have done the coding wrong. Could someone post the code for cookies so I can check?

Acidic
Jan 10th, 2005, 11:29 AM
There is such a thing as a session cookie. Which gets deleted when the browser closes, in fact they are the default type of cookie. If you don't specify an expiration date, then that's what gets set, to find script on using cookies have a look at:
http://js-x.com/search/?op=2&q=28

GamerMax5
Jan 11th, 2005, 07:08 AM
That's probably what was wrong. I didn't set an expiration date. Thanks for that.