Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
61
rated 0 times [  67] [ 6]  / answers: 1 / hits: 25833  / 10 Years ago, thu, april 3, 2014, 12:00:00

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?


More From » php

 Answers
6

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....


[#71630] Wednesday, April 2, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ryderalfonsos

Total Points: 655
Total Questions: 88
Total Answers: 91

Location: Nauru
Member since Thu, Feb 2, 2023
1 Year ago
ryderalfonsos questions
Mon, Sep 9, 19, 00:00, 5 Years ago
Wed, Feb 13, 19, 00:00, 5 Years ago
Tue, Feb 12, 19, 00:00, 5 Years ago
Fri, Dec 28, 18, 00:00, 6 Years ago
;