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

有帮助吗?

解决方案

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);

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top