This is the code. "data" comes from PHP and it's the image source of an image:
document.cookie = "imagePath=" + data;
var myCookie = document.cookie.replace(/(?:(?:^|.*;\s*)imagePath\s*\=\s*([^;]*).*$)|^.*$/, "$1");
It works very well in Chrome and FF - console.log returns nameoffile.jpg, but for some reason Internet Explorer returns: nameoffile.jpg __
What can I do about this?