Skip to content

Tag: cookies

For some reason document.cookie not working

I have a cookie that gets set in the server on a successful logon to a complex PWA. However I am having trouble deleting that cookie from within the browser on log off. In order to test that further I have a (psuedo – by which I mean its still the original index.html, but using web components I can simu…

JavaScript get cookies function

I’ve been learning on how to get Cookies from a web page. Below is the code extracted from w3schools.com. I am not sure why they used this line of code in the getCookies(cname) function as shown below. Why should there be a blank space at the start of every string in the array “ca”? And why …

Chrome not saving cookies in localhost

I know this has been asked before but none of the solutions named work. I am using Spring boot and React for my webapp, and need to set cookies on the website. I am developing and testing using Google Chrome. When I get the response from the server, the cookie is present and visible. However it is not saved i…

Koa & Passport Missing credentials

I have a Koa server that uses Passport to authenticate users against an Array, and a React client. After successful login, the following requests are not authenticated as the cookie is undefined. The authenticate function’s error parameter has: After browsing the site, I fixed the usual errors, calling …