When I log into my application I get a cookie with a value of say odm7krain1ms6bic7irfvpsj91 .
as long as I stay on this tab and move through the application I’m “usually” okay. If I open another tab and go the same url, I’ll get a new cookie that overwrites the old one and my old session is lost. How can I prevent this from happening?
I’ve seen this happen when I’m using XHR requests also which effectivly logs me out of my current session.
Try adding the following to your core.php file:
These parameters should force the cookie to persist. This will set both PHP and CakePHP’s settings to allow cookies to persist over http and https.