Question

I have a site, sometime (let say 1 time over a 1000) the login does not work, on the server side all seem to work as expected but at the end the user is not loggend in, just as if the form was not submitted.

It would be interesting to actually debug the system but I already wasted a lot of time, so I'm searching for a workaround.

When the "impossible to login" situation occur, there is no way to get out, except erasing the browser cache (for example going to invisible/incognito/private mode). It is possible to wipe out all the relevant cookies and doing some "strong" reload whit javascript? To put the browser in the same state of "invisible/incognito/private mode".

Was it helpful?

Solution

In that scenario you can do this :

var cookies = $.cookie();
for(var cookie in cookies) {
   $.removeCookie(cookie);
}

Also : reload your page using location.reload(true);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top