Where to find the cookies in Windows 7 when creating cookies in javascript under Visual Studio? RRS feed

  • Question

  • Hi All,

    I am creating cookies in the JavaScript file.

    I just want to know where to find them?I mean at which location have the been created.

    function being used to create is below.

    function createCookie(name,value,days) {
    	if (days) {
    		var date = new Date();
    		var expires = "; expires="+date.toGMTString();
    	else var expires = "";
    	document.cookie = name+"="+value+expires+"; path=/";

    And I am reading those cookies by using this code

    function readCookie(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        return null;

    While looking into "ca" in "readCookie(name)" method I see the previous cookies but I wanted to see where in my win7 where they are created.

    I went to the folder location.


    But I couldn't find the cookies that I have created I mean with my name.

    Please let me know If my approach is wrong or am I missing something?

    • Edited by Mozak104 Tuesday, March 20, 2012 12:26 PM Forgot to complete the question.
    • Moved by Min Zhu Thursday, March 22, 2012 7:49 AM (From:Windows Presentation Foundation (WPF))
    Tuesday, March 20, 2012 12:21 PM


All replies