{"action":"created","issue":{"url":"https://api.github.com/repos/js-cookie/js-cookie/issues/79","labels_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/79/comments","events_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/79/events","html_url":"https://github.com/js-cookie/js-cookie/issues/79","id":102679079,"number":79,"title":"Unable to create cookie at the root of a site","user":{"login":"Trebly","id":1492375,"avatar_url":"https://avatars.githubusercontent.com/u/1492375?v=3","gravatar_id":"","url":"https://api.github.com/users/Trebly","html_url":"https://github.com/Trebly","followers_url":"https://api.github.com/users/Trebly/followers","following_url":"https://api.github.com/users/Trebly/following{/other_user}","gists_url":"https://api.github.com/users/Trebly/gists{/gist_id}","starred_url":"https://api.github.com/users/Trebly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trebly/subscriptions","organizations_url":"https://api.github.com/users/Trebly/orgs","repos_url":"https://api.github.com/users/Trebly/repos","events_url":"https://api.github.com/users/Trebly/events{/privacy}","received_events_url":"https://api.github.com/users/Trebly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/js-cookie/js-cookie/milestones/3","html_url":"https://github.com/js-cookie/js-cookie/milestones/v2.0.4","labels_url":"https://api.github.com/repos/js-cookie/js-cookie/milestones/3/labels","id":1257030,"number":3,"title":"v2.0.4","description":"","creator":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2015-08-16T18:27:14Z","updated_at":"2015-08-24T04:14:44Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-08-24T01:01:03Z","updated_at":"2015-08-25T23:19:54Z","closed_at":null,"body":"Hi,\r\n\r\nI  try to create cookies which are common for all pages of a site, opened in several tabs.\r\n\r\nEven the use of {site :'mysite', path: '/' } the cookie is created in path  \"mysite/mypage\".\r\n\r\nChrome windows 44.0.2403.157 m.\r\njs.cookies 1.5.1 \r\nI am into a debugging phase of my soft and I have not planned to change js.cookie to version 2.0.3 before the end of current development phase (I made some adaptations to fit with 1.5.1). But if this problem is linked to the version, I will upgrade even not planned.\r\n\r\nTrebly"},"comment":{"url":"https://api.github.com/repos/js-cookie/js-cookie/issues/comments/134768298","html_url":"https://github.com/js-cookie/js-cookie/issues/79#issuecomment-134768298","issue_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/79","id":134768298,"user":{"login":"Trebly","id":1492375,"avatar_url":"https://avatars.githubusercontent.com/u/1492375?v=3","gravatar_id":"","url":"https://api.github.com/users/Trebly","html_url":"https://github.com/Trebly","followers_url":"https://api.github.com/users/Trebly/followers","following_url":"https://api.github.com/users/Trebly/following{/other_user}","gists_url":"https://api.github.com/users/Trebly/gists{/gist_id}","starred_url":"https://api.github.com/users/Trebly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trebly/subscriptions","organizations_url":"https://api.github.com/users/Trebly/orgs","repos_url":"https://api.github.com/users/Trebly/repos","events_url":"https://api.github.com/users/Trebly/events{/privacy}","received_events_url":"https://api.github.com/users/Trebly/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T23:19:53Z","updated_at":"2015-08-25T23:19:53Z","body":"Hi,\r\n\r\nI uses \r\n\r\nCookies.set( \"name\", \"value\", { site \"mysite\",  path: \"/\" });\r\n\r\nI confirm the version is 1.5.1, this Cookies.set creates the cookie with right value but \r\nif url is  \r\n`http:// <mysite>/<mypage>/<mysecond_level>#<fragment>`\r\nthe path is \"/<mypage>/<mysecond_level>\" not \"/\"\r\nwith google chrome with filter on <mysite> I can find (filter) all related cookies to the site\r\n\r\nMycode is : \r\n`Cookies.json = true;\r\n Cookies.raw = true;\r\nvar dnow = new Date( ).getTime();\r\nvar TOC_navlinks = Array [...................... ];\r\n  var bkm_parmsS = {set_date:dnow, upd_date:dnow, limit_date:dnow+limit_span,str_parms:\"{ expires: 365, path: '/',domain: 'bty-blg1.trebly.net'}\"}; \r\n Cookies.set('bty_blg1-bookmarks', TOC_navlinks, bkm_parmsS.str_parms);\r\n`\r\nWhen I get the cookie I have just to JSON.parse(get);\r\n\r\nBest regards\r\n\r\nTrebly\r\n"}}