Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Disable Safari 7.0.2 keychain password save

How can I disable safari from saving a user/pass from a form using html or javascript?

I've had this issue that came up with safari 7.0.2 where you can save a user/pass to a keychain and when you goto that same form it automatically overrides those fields? Personally I think this is horrible behavior. I don't think fields should ever be overridden.


I've created an isolated version that you can demo the issue here. http://dev.davidsalazar.com/issues/safari-autofill/


Steps to replicate (ensure you use latest safari 7.0.2)

1. Type and user/pass click save. It should prompt you to save to keychain, accept the save.

2. Now click on the link load random data and you will notice that safari will now be overriding those fields with your perviously saved fields.

iMac (27-inch Late 2009), OS X Mountain Lion (10.8.1)

Posted on Mar 24, 2014 9:10 AM

Reply
16 replies

Mar 26, 2014 11:29 AM in response to davidksalazar

Hello DavidKSalazar,


It sounds like you are being prompted to save your password to a keychain and you want it to stop. From what you describe it seems like iCloud Keychain is turned on. You can use this info to close it in your Settings:

Devices using iOS 7.0.3 or later:

Go to Settings > iCloud and turn Keychain on.

From: iCloud: Frequently asked questions about iCloud Keychain

http://support.apple.com/kb/HT5813


Thank you for using Apple Support Communities.

All the best,

Sterling

Mar 29, 2014 11:03 PM in response to davidksalazar

Have you tried removing the keychain for said website? For example, the one that you provided. I followed your instructions.


Typed "tester" in the username section. Then "user" in the password section. When prompted to save the password, I clicked save.


Closed the window and went back to it. I saw that both fields were taken up, "tester" and "****" for user. I clicked on Load random data into fields. Saw the random data, but then Safari overridden them.


Went into Safari---> Preferences---> Passwords and deleted the password associated with that website. Went back and clicked on Load Random Data Into Fields and it did just that.


I know it's not exactly what you are looking for, but it's an option.


Besides, I've had more than one Yahoo email address. If I were to double click the username, it gave me the option for both email addresses with their own password.


KOT

Mar 29, 2014 11:12 PM in response to Kingoftypos

I do not want a solution that involves messing with browser preferences. I want a solution that I can do for all users.


If you can't wrap your head around a scenario where this would be necessary. Think about this. You have a multi user environment let's say a cms. When you try to edit or create a new user record, safari asks to save it to keychain. Now whenever they try to edit an existing user record it now overrides the fields with the one saved on the keychain. Can you understand how this behavior can be unacceptable and how simply disabling that on safari or manually deleting the saved keychain entry is not a long term solution to this issue.

Mar 30, 2014 5:11 AM in response to davidksalazar

The problem is in the default behaviour of Safari. We can't expect novice users to make browser configuration changes.


As an illustration of the problem:


I administer a site and registered users have a profile page where they can change various parameters - including their email address. Whenever a user goes to their profile page in Safari 7 it immediately overwrites their email field with their username. They then can't save any changes to their profile until they replace their username with a valid email address. Why is Safari putting their username into an email address field?


I can prevent this behaviour by allowing users to change their username and hence exposing that field in their profile. This is not ideal as I don't want people changing their identity at will. However, this doesn't solve the underlying problem because when I, as the administrator, visit a user's profile it overwrites their email address with my username.


This is definitely a bug and not a feature. A field that has a value tag, or autocomplete set to off, should not be overwritten by the browser.

Apr 21, 2014 7:08 AM in response to davidksalazar

Hacky Solution....


I wrapped my login control around a div and set display:none. I then used some JavaScript (JQuery) to wait a 1/2 second after the document was loaded and then displayed the div. Since the fields are not visible the browser has nothing to fill. They are coming up blank every time.


Not the best solution, but will work until they are ready to start respecting autocomplete=off.


<divid="control"style="display:none">

...login fields

</div>


<script>

$(document).ready(function () {


setTimeout(function () {

$('#control').toggle();

}, 500);

});

</script>


Hope This Helps...



Disable Safari 7.0.2 keychain password save

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.