Skip to content
Advertisement

Chrome not clearing SESSION COOKIES on close/exit

I’m developing an app on localhost using:

Google Chrome 33.0.1750.154 m

XAMPP Version 1.8.3

I’ve been using these for a while now and today all of a sudden Chrome is not clearing session cookies when I close the browser (all windows), even after I restart my machine, session cookies are still set from last session.

I have this code at the top of my page:

<?php
session_start();
if(!isset($_SESSION['userID']))
{
        echo "<script>alert('Username does not exist')</script>";
        echo '<script type="text/javascript"> window.location="login.html";</script>';
        exit(1);
}
?>

Which worked fine, redirecting me to the login page after the browser has been closed, up until a few hours ago.

NOTE:

Tested IE10, IE11, and FF and they DO NOT exhibit the same behavior, they are clearing session cookies as expected.

I have also verified that the

Continue where I left off…

setting is unchecked.

Anybody know what’s going on here and how to fix it?

Advertisement

Answer

Thanks to KevinB for pointing me in the right direction.

Turns out it wasn’t the cookie setting like I thought, I ended up keeping that set to:

Allow local data to be set (recommended)

I remembered that

Google NOW

had recently been installed on my machine, and that I allowed it to run in the background when I did not have my browser open, I believe this was the culprit to my session cookies not being cleared.

What ended up fixing this issue was to uncheck the:

Continue running background apps when Google Chrome is closed

setting under the SYSTEM section.

Hope this helps save some headaches….

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement