The outputs of this Cookie Script do not mix with other strings outcoming from other directory cookies , thanks to the variable assignment : var the_cookie = "MultipleInfos="+GetCookie("MultipleInfos"); This is a Programs'Set that finally shows clearly what value is returned to what function and has follow up comments on all used libraries.