You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.
I know this is a FAQ, and it's explained in the documentation that if you want a cookie to be valid on the whole site, it needs to be created with something like
$.cookies("foo", "bar", {
path : "/"
});
I'm in a situation where the cookie is created in a login page, where the user is redirected when they try to access a page like "/foo/bar/baz". But I want the cookie to be valid on all pages, so I obviously create it with the "path" : "/" options.
For some reason, when I open the Webdevelopper "View cookie information pane" in FF8, or when I use the settings screen to look at cookie details in Chrome, the cookie is displayed with a path like "foo/bar" (typically, the parent of the page I tried to access). So obvioulsy if I navigate to another page, the browser does not send the cookie.
I debugged the source of the plugin, and as far as I can tell the call
"""javascript
document.cookie = name + '=' + encodeURIComponent(value) + expires + path + domain + secure;
"""
is done with path being "; /", which is what I expect, isn't it ?
I have absolutely no clue as to what can be messing up with the cookies on the client side ; is there any thing I can have a look at ? Could the server somehow modifiy the cookie, so that on a subsequent request the browser feel the need to modify its 'path' ?
Any help welcome.
The text was updated successfully, but these errors were encountered:
Note that when I use the docCookies library from MDN https://developer.mozilla.org/en/DOM/document.cookie I can finaly get a site-wide cookie ... but they seem to call document.cookie in a slightly different ; is it FF specific ?
Test showed for me it's working on Firefox 18 (that is quite some versions ahead). Maybe the issue occured because with the older version of the plugin you seem to have been using the name wasn't yet correctly encoded and Firefox borked on the name:
Hi !
I know this is a FAQ, and it's explained in the documentation that if you want a cookie to be valid on the whole site, it needs to be created with something like
$.cookies("foo", "bar", {
path : "/"
});
I'm in a situation where the cookie is created in a login page, where the user is redirected when they try to access a page like "/foo/bar/baz". But I want the cookie to be valid on all pages, so I obviously create it with the "path" : "/" options.
For some reason, when I open the Webdevelopper "View cookie information pane" in FF8, or when I use the settings screen to look at cookie details in Chrome, the cookie is displayed with a path like "foo/bar" (typically, the parent of the page I tried to access). So obvioulsy if I navigate to another page, the browser does not send the cookie.
I debugged the source of the plugin, and as far as I can tell the call
"""javascript
document.cookie = name + '=' + encodeURIComponent(value) + expires + path + domain + secure;
"""
is done with path being "; /", which is what I expect, isn't it ?
I have absolutely no clue as to what can be messing up with the cookies on the client side ; is there any thing I can have a look at ? Could the server somehow modifiy the cookie, so that on a subsequent request the browser feel the need to modify its 'path' ?
Any help welcome.
The text was updated successfully, but these errors were encountered: