开发者

Password remember does not work as needed

开发者 https://www.devze.com 2022-12-25 03:44 出处:网络
On the website I am working on it has been deployed but the problem I am facing is that when I enter a username and password and click on the check box to remember...It remembers the password for some

On the website I am working on it has been deployed but the problem I am facing is that when I enter a username and password and click on the check box to remember...It remembers the password for sometime.. wen I login in after 5 or 10 minutes it remembers the password but aftr a long period of time like about 2开发者_Python百科hours it forgets the username and password and i have to type it in all over again... this dint used to happen with the old server as even I could sign in and it remembered the password the next day until i log off... what can be the reason

The session state im using is:


It sounds like you are facing time-out issues.

That is, you enter the site, and then walk away for some time, and come back, and the site has "forgotten" you, it doesn't know what to do, so it logs you out.

You can fix this by making your Session Timeout longer.

Here's more info and how to do it.

If this is indeed the case, there's nothing wrong with your 'Remember Me" function.


Is this setting the cookie expire period??? I am confused

function rememberStyle( cookieName, cookieLife ) {

for( var viewUsed = false, ss = getAllSheets(), x = 0; window.MWJss && MWJss[x] && ss[x]; x++ ) { if( ss[x].disabled != MWJss[x] ) { viewUsed = true; break; } }
if( !window.userHasChosen && !viewUsed ) { return; }
for( var x = 0, outLine = '', doneYet = []; ss[x]; x++ ) {
    if( ss[x].title && ss[x].disabled == false && !doneYet[ss[x].title] ) { doneYet[ss[x].title] = true; outLine += ( outLine ? ' MWJ ' : '' ) + escape( ss[x].title ); } }
if( ss.length ) { document.cookie = escape( cookieName ) + '=' + escape( outLine ) + ( cookieLife ? ';expires=' + new Date( ( new Date() ).getTime() + ( cookieLife * 86400000 ) ).toGMTString() : '' ) + ';path=/'; }

}

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号