View Full Version : cookie path problem

07-28-2011, 04:00 PM
Unfortunately, this isn't standard cookie stuff (I don't think).

I have a compiled .exe loader for a program which includes an .html page which records the input of a textbox to a cookie.

That much works OK. But reading it back isn't working.

It seems the path is:


i.e. a temp dir related to the directory from where the .exe file was created.

What I need is for the cookie to be available everywhere:


Is anyone able to shed some light? Adding ";path=/"; isn't working.

I guess it's something to do with being compiled?

07-28-2011, 05:20 PM
Fixed. It was a stupid syntax problem:

document.cookie = isName+"="+escape(isValue)+";expires="+expDate.toGMTString();+";path=/";

instead of...

document.cookie = isName+"="+escape(isValue)+";expires="+expDate.toGMTString()+";path=/";

The latter is correct.