I'm using AJAX for fast input validation on my login page. If everything is correct, the user is redirected.
Here's the code:
$(form).submit(function () {
$.post($(this).attr('action'), $(this).serialize(), function (data) {
if (data.status == 'SUCCESS') {
window.location = data.redirectUrl;
}
}
...
It works really well in all browsers. But there's a problem in Chrome. It doesn't offer to save the password.
When JavaScript is turned off, the password is saved, so the problem is definitely in redirection to a new location.
How can I fix that?
Have a read here - why doesn't chrome recognize this login form? .
The important comment is:
So you could maybe consider removing the Ajax and just letting the Form post to login, this will probably be the only way for Users that do not have JavaScript enabled to login with your form too.