I've set a cookie in Scala similar to the following:
val cookies:Seq[Cookie] = new Seq()
val nDaysExpire:Int = 2000
val nSecondsExpire:Int = nDaysExpire * 24 * 60 * 60
val cookie:Cookie = new Cookie(sCookieID, sValue, Option(nSecondsExpire))
cookies = cookies:+ cookie
Ok(views.html.main(sID)).withCookies(cookies:_*)
and then I immediately delete the cookie in JavaScript. I have even deleted the cookie 30 seconds after the page has loaded.
When I reload the page, the Scala code still sees the cookie. But in the JavaScript, the cookie is no where to be found when I call: document.cookie.
What's going on?