removing a cookie via ghcjs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

removing a cookie via ghcjs

Michael Litchard-2
Using ghcjs, I am able to read a cookie using getCookie. There's no corresponding remove/deleteCookie that I can find. Could I get some assistance in how to remove the same cookie I can see using getCookie?



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: removing a cookie via ghcjs

Jeremy Shaw-3
Hello,

There is no underlying 'deleteCookie' support in browsers. Instead you call 'setCookie' and set the expiration date to be in the past. Then the browser will delete the cookie.


Not sure which getCookie function you are using, but there is likely a setCookie function nearby.

- jeremy

On Thu, Jun 7, 2018 at 11:41 AM, Michael Litchard <[hidden email]> wrote:
Using ghcjs, I am able to read a cookie using getCookie. There's no corresponding remove/deleteCookie that I can find. Could I get some assistance in how to remove the same cookie I can see using getCookie?



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: removing a cookie via ghcjs

Michael Litchard-2
Jeremy,

Thank you. I had been experimenting with setCookie, but wasn't setting the expiration date correctly. All good now. 

On Thu, Jun 7, 2018 at 10:28 AM, Jeremy Shaw <[hidden email]> wrote:
Hello,

There is no underlying 'deleteCookie' support in browsers. Instead you call 'setCookie' and set the expiration date to be in the past. Then the browser will delete the cookie.


Not sure which getCookie function you are using, but there is likely a setCookie function nearby.

- jeremy

On Thu, Jun 7, 2018 at 11:41 AM, Michael Litchard <[hidden email]> wrote:
Using ghcjs, I am able to read a cookie using getCookie. There's no corresponding remove/deleteCookie that I can find. Could I get some assistance in how to remove the same cookie I can see using getCookie?



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: removing a cookie via ghcjs

Tom Ellis-5
In reply to this post by Jeremy Shaw-3
Any idea why this functionality isn't just wrapped up in a function called
'deleteCookie'?

On Thu, Jun 07, 2018 at 12:28:01PM -0500, Jeremy Shaw wrote:

> There is no underlying 'deleteCookie' support in browsers. Instead you call
> 'setCookie' and set the expiration date to be in the past. Then the browser
> will delete the cookie.
>
> https://stackoverflow.com/questions/2144386/how-to-delete-a-cookie
>
> On Thu, Jun 7, 2018 at 11:41 AM, Michael Litchard <
> [hidden email]> wrote:
>
> > Using ghcjs, I am able to read a cookie using getCookie. There's no
> > corresponding remove/deleteCookie that I can find. Could I get some
> > assistance in how to remove the same cookie I can see using getCookie?
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.