By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

Where are cookies created in Javascript stored?

P: 83

In my application i create a cookie using javascript using a function like this.

Expand|Select|Wrap|Line Numbers
  1. function setCookie(c_name,value,expiredays)
  2. {
  3.     var exdate=new Date();
  4.     exdate.setDate(exdate.getDate()+expiredays);
  5.     document.cookie=c_name+ "=" +escape(value)
  6.                                 +((expiredays==null) ? "" : ";expires="
  7.                                 +exdate.toGMTString());
  8.     //alert ("date=" + exdate.toGMTString());
  9. }
The problem is i can't find it on the machine (Vista ie7). Cookies created using asp scripts show under the temporary internet files but seemingly not those created using javascript.

Can anyone tell me where they are stored pls...

Jun 5 '08 #1
Share this Question
Share on Google+
5 Replies

Expert Mod 15k+
P: 16,027
It varies depending on the browser and the OS. In XP, IE would store in "Documents and Settings". I'm not sure about Vista. Other browsers may store in, for example, the Application Data folder.
Jun 5 '08 #2

P: 83
well i feel i've searched everywhere. i can see other cookies in various folders but not t the javascript one. Clearly, it's there somewhere as otherwise the application wouldn't work. Is it possible that is is strored as a session cookie ? That said it still persists if i close bowser and/or reboot my pc ???
Jun 9 '08 #3

Expert Mod 15k+
P: 16,027
You may have to unhide hidden folders. If this doesn't help, you may get a good response in the Windows forum since this seems to be a Vista issue.
Jun 9 '08 #4

P: 83
no it's not a vista issue, i have the same problem in xp. I've tried searching all hiffen folders also but to no avail...
Jun 9 '08 #5

Expert Mod 15k+
P: 16,027
Just so that this doesn't end up being much ado about nothing, why exactly do you need to know where the cookies are stored? If you want to read or delete them, you can use JavaScript to do that.
Jun 9 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.