I have a basic site I made for practice purposes and have built a login/member type functionality with it. The weird thing is that when I try to login开发者_JS百科 on different computers, some will login in properly while others will just redirect me and not log me in although my credentials are good. I am thinking maybe it is different security settings in the browsers for storing sessions, cookies? But all the browsers I tested on have cookies enabled but the site and login feature will only work for some. Any suggestions?
I had the same problem once and it was caused by the browser. If you redirect the user after login with
redirect(url);
try to replace that with
redirect(url, 'refresh');
IE doesn't play well with cookies and header redirects.
精彩评论