Why does Chrome ignore local jQuery cookies?

Chrome doesn't support cookies for local files (or, like Peter Lyons mentioned, localhost*) unless you start it with the --enable-file-cookies flag. You can read a discussion about it at http://code.google.com/p/chromium/issues/detail?id=535.

*Chrome does support cookies if you use the local IP address (127.0.0.1) directly. so in the localhost case, that could be an easier workaround.


For local applications use localStorage in Chrome instead: http://people.w3.org/mike/localstorage.html


i had some problem and solved it this terrible solution. using store and cookie plugin together.

<script src="js/jquery.cookies.2.2.0.js" type="text/javascript"></script>
<script src="js/jquery.Storage.js" type="text/javascript"></script>

var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

//get cookies
var helpFlag=(is_chrome)?$.Storage.get("helpFlag"):$.cookies.get("helpFlag");

//set cookies
if(is_chrome)$.Storage.set("helpFlag", "1");else $.cookies.set("helpFlag", "1");

I know that this isnt perfect solution but works for me


This did the job for me:

enter image description here

Right click on your Chrome Icon and select Properties, Shortcut tab and add --enable-file-cookies at the last of the target path.