ScottHamper / Cookies

JavaScript Client-Side Cookie Manipulation Library
The Unlicense
1.77k stars 170 forks source link

value set by `Cookies.set` with option `path` cannot be read on IE #32

Closed PikachuEXE closed 9 years ago

PikachuEXE commented 9 years ago

Example coffeescript:

Cookies.set("key", value, {
        # page specific
        path: window.location.pathname,
        # expire in 1 day
        expires: 24 * 60 * 60,
      })

Chrome seems ok with about script, not sure about Firefox/Safari/other browsers.

ScottHamper commented 9 years ago

Hey Pikachu,

I'm unable to reproduce this issue. One thing to keep in mind is that using window.location.pathname for the path option could fail if the pathname includes an extension, e.g., "/directory/file.html".

If you can provide more information for a reliable reproduction case, then I can investigate further. For example, what is the value of window.location.pathname? Which exact version of IE are you using?

PikachuEXE commented 9 years ago

Sorry, I don't have time until mid-March, will try to reproduce and provide more detail then. I currently workaround this with some page specific key on cookie name which still works for me.