Session Data Lost in Chrome Only

Randomly Losing Session Variables Only In Google Chrome & URL Rewriting

I had the same issue, and to fix it I only had to create a favicon.ico and place it in the webroot - otherwise I could see using Fiddler that a 404 resulted for this with every page request from Chrome (despite me not actually linking to a favicon in the page markup).

In my mind this is clearly a bug in Chrome, as the lack of a favicon should have no bearing on session data.

Chrome and session data lost

Solved.
It was the missing favicon problem... (Chrome looks for a favicon and if it doesn't find it, the session data dissapears).
The solution was to put a favicon in the root folder of the project.
Strange problem... but finally solved.

ASP.NET Session lost in Chrome

The issue is on the fetch and not on the server side.

The strange thing is that it's work on IE. Apparently IE don't have the same policy for the fetch API.

You have to make sure to add the property credentials to include or same-origin to keep the session on your request.

Warning : Put credentials to include fire a security error in Chrome.
The same-origin value resolved my problem.

Example of request :

fetch(uri,{
method:'GET',
credentials:'same-origin'
})
.then()
.catch()

Chrome session data lost

After a lot of searching I've found the problem...memcache.
For some unknown reason memcache and sessions are not to work together on my PHP installation. Other caching systems are ok, but if I activate memcache sessions are not working in Chrome only.

  • PHP 7.1.8
  • Memcache 3.0.9-dev
  • Memcached 3.0.3

I've also tried with Memcache 3.0.8 (stable) but the result doesn't change...sessions are ok but not in Chrome that loses session every page reload.



Related Topics



Leave a reply



Submit