Safari如何知道何时提示用户保存密码? [英] How does Safari know when to prompt user to save password?

查看:181
本文介绍了Safari如何知道何时提示用户保存密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与>浏览器如何知道何时提示用户保存密码?,除了我的特定于Safari.

This related to How does browser know when to prompt user to save password? except mine is specific to Safari.

我有一个网站,可以用两种不同的方式登录.第一种是您必须在其中输入电子邮件,密码和帐户域的主站点.第二种方法是实际进入您的域(指向我的服务器),此时仅要求您输入电子邮件和密码.

I have a website in which there are two different ways you can log in. The first is the main site in which you have to enter your email, password, and your account's domain. The second way is to actually go to your domain (which is pointing at my server) at which point you're only asked to enter in your email and password.

以第二种方式登录(两个输入),Safari,Chrome和Firefox都会询问我是否要保存用户名和密码(如预期的那样).

Logging in the second way (two inputs), Safari, Chrome and Firefox will all ask if I'd like to save my username and password (as expected).

但是以第一种方式(三个输入)登录时,只有Chrome和Firefox会询问. Safari没有.

But logging in the first way (three inputs), only Chrome and Firefox ask. Safari does not.

我的表单不是AJAX/Javascript.它具有一个表单标签,一个提交按钮以及三个带有ID/名称的输入-电子邮件,密码(类型=密码)和account_domain.我没有autocomplete = off.

My form is not AJAX/Javascript. It has a form tag, a submit button, and three inputs with the ids/names - email, password (of type=password), and account_domain. I do not have autocomplete=off.

有人知道Safari在寻找什么要求保存用户名/密码吗?是b/c我有三个输入而不是两个输入吗?

Does anyone know what Safari is looking for to ask to save username/passwords? Is it b/c I have three inputs instead of two?

请注意,我仅使用Safari在妻子的Mac上进行了相同的测试,但在两种情况下都没有提示她进行保存.所以我不知道.

As a note, I ran the same test on my wife's Mac using Safari only and she wasn't prompted to save in either case. So I don't know.

我确认我们俩都没有点击这两个站点的永远不要记住密码".

I verified that neither of us had clicked "never remember passwords" for either of these sites.

推荐答案

我遇到了同样的问题,而您的帖子回答了我的问题.

I was having this same issue, and your post answered my problem.

我只有一个简单的表单,只需要输入密码,而不会在手机上提示Safari保存密码:

I just had a simple form that only requested a password, which would not prompt Safari on a mobile to save the password:

<fieldset>
<legend>Please login below:</legend>
<form role="form" id="access" name="access" method="post">
    <div class="form-group form-group-sm">
        <label for="password">Password</label>
        <input class="form-control" required type="password" placeholder="Enter Password" name="password" id="password" />
    </div>
    <div class="form-group form-group-sm">
        <input class="btn-lg btn-primary center-block" type="submit" value="Login" />
    </div>
</form>

阅读您的帖子后,我添加了一个用户名"输入字段,如下所示:

After reading your post, I added a "username" input field as follows:

<fieldset>
<legend>Please login below:</legend>
<form role="form" id="access" name="access" method="post">
    <div class="form-group form-group-sm">
        <label for="username">Username</label>
        <input class="form-control" required type="text" placeholder="Enter Username" name="username" id="username" />
    </div>
    <div class="form-group form-group-sm">
        <label for="password">Password</label>
        <input class="form-control" required type="password" placeholder="Enter Password" name="password" id="password" />
    </div>
    <div class="form-group form-group-sm">
        <input class="btn-lg btn-primary center-block" type="submit" value="Login" />
    </div>
</form>

添加完之后,我现在提示保存密码.

After adding that, I now got a prompt to save the password.

因此,我认为Safari正在寻找用户名,名称,电子邮件等与密码字段绑定在一起.我没有对此进行过多测试,但是我相信有更多经验的人可以验证这一点.

So I think Safari is looking for a username, name, email, etc. to tie along with a password field. I didn't test this too much, but I'm sure someone with more experience can verify that.

感谢您的信息.

这篇关于Safari如何知道何时提示用户保存密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆