Can I force Google Chrome to remember passwords?

85

22

Is there a way to force Google Chrome to remember passwords for sites that have autocomplete turned off?

Clarification:

I am a programmer, but ideally, I'd like a method that I could help regular users implement, too.

Nathan Long

Posted 2009-09-22T22:14:15.030

Reputation: 20 371

1I'm assuming you've got "Offer to save passwords" turned on. – ChrisF – 2009-09-22T22:18:51.027

@ChrisF - yes, I do. – Nathan Long – 2009-09-23T09:16:40.113

Sorry, but I had to ask. – ChrisF – 2009-09-23T11:38:28.797

3I feel it needs to be said: giving web sites the ability to make your browser seem broken is not a feature browsers should implement. – Kirk Woll – 2014-01-23T20:43:43.227

Answers

66

use the autocomplete=on extension. it changes 'autocomplete=off' to 'autocomplete=on' in web pages, so your passwords will be remembered.

yanokwa

Posted 2009-09-22T22:14:15.030

Reputation: 2 156

6"Item not found. This item may have been removed by its author." – Borislav Ivanov – 2015-01-14T08:07:21.863

2

what about this new updated one; https://chrome.google.com/webstore/detail/piechbhjioolbecaioglhamjjjkmbchj/publish-accepted?hl=en-US

– Abdessamad Idrissi – 2015-02-24T22:01:06.953

Or https://chrome.google.com/webstore/detail/piechbhjioolbecaioglhamjjjkmbchj/ for the public link that allows installing the extension :)

– Eran Boudjnah – 2015-06-15T07:05:34.623

Doesn't work for router login page. Chrome 50.x – Khurshid Alam – 2016-10-19T16:57:40.637

What about chrome for Android? Touch keyboard and passwords are not compatible. – Ivan G. – 2012-08-01T10:23:38.097

1Do note, that author still can make a form that will absolutely won't remember history. – Oleg V. Volkov – 2012-08-21T19:20:11.453

This extension sopped working somewhere around Chrome 25. Can others confirm? – Nowaker – 2013-03-07T23:24:05.033

@Damian I have Chrome 25.0.1364.172 m and it is still working fine for the sites I use. – DanO – 2013-03-21T23:54:46.947

Doesn't work for me in Chrome 31.0.1650.57 m – Anderson – 2013-11-30T15:18:34.730

1Chrome extensions have come along since I asked this question. Thanks for pointing this one out. – Nathan Long – 2009-12-23T12:53:19.620

19

Workaround: use a bookmarklet

This is not really a solution, but you can hack a workaround for this if you know a little Javascript by making a bookmarklet that fills out the username and password fields. This would work:

  1. Create a bookmark in your toolbar area by dragging the favicon from any website into that area.
  2. Right-click that bookmark and choose Edit
  3. Change the Name field to whatever you like
  4. In the URL area, enter some javascript that will fill in the desired fields.
  5. Click OK to save that.
  6. Now you can click that bookmarklet to fill those fields

For example, if the page you want to fill in has fields with IDs of 'user_name' and 'password', this javascript would fill them with whatever you define near the beginning.

javascript:function%20enterLogin(){username="your_username";password="your_password";document.getElementById('user_name').value=username;y=document.getElementById('password').value=password;}enterLogin();

This is not secure at all, of course, if anyone you don't trust may open your browser; they can click to edit this and see your login info.

But it's not much worse than having the browser remember your passwords if it doesn't use a master password to encrypt them; some digging around in the menus will let you view those. And anyway, you shouldn't let people you don't trust use your computer.

Nathan Long

Posted 2009-09-22T22:14:15.030

Reputation: 20 371

This requires storing your password unencrypted in your code, which is not advisable. The password manager that saves these things for you uses encryption. – Adam Katz – 2018-07-23T19:22:03.757

3+1 Nice. This is what I use on a site which uses jQuery javascript:$("#username").val("username");$("#password").val("password"); – IsmailS – 2012-04-12T04:00:48.903

12

Chrome has native support for it: If you enable chrome://flags/#enable-password-force-saving then you can right click on the password field and instruct the browser to store it.

It's now been renamed to chrome://flags/#PasswordForceSaving (Chrome 65 and possibly some earlier versions)

If you have a Password Manager extension installed, Chrome may disable this internal feature if it detects such a Password Manager. Temporarily disabling the extension will allow you to use this built in mechanism.

Daniel F

Posted 2009-09-22T22:14:15.030

Reputation: 751

2+1 for native solution that doesn't require another extension – Jonathan Gawrych – 2017-03-16T23:58:58.300

Somebody downvoted this answer without commenting why. FWIW, if you have a Password Manager extension installed, Chrome may disable this internal feature if it detects such a Password Manager. – Daniel F – 2018-02-17T09:29:26.753

2I have Chrome 77, and chrome://flags/#PasswordForceSaving appears to be completely gone now. – browly – 2019-09-26T21:32:02.327

6

I often do the following in Firefox/Firebug:

  • Right click form, click "Inspect element"
  • Look for the attribute autocomplete="off" (usually on the form tag)
  • Right click "autocomplete" then click "Remove attribute..."

I can't find a way to delete attributes with Chrome's Developer Tools, but you can change it to autocomplete="on" or change the attribute name to e.g. "width".

DisgruntledGoat

Posted 2009-09-22T22:14:15.030

Reputation: 4 068

1But when the page is reloaded, the autocomplete attribute will be reset to "off", defeating the purpose; Chrome will remember the password but won't fill it in. – amphetamachine – 2011-07-22T03:36:16.983

@amph At the time of writing, doing this did work. Removing autocomplete brings up the prompt to save the password, and when you return it filled it in, even if autocomplete was off. Maybe that doesn't happen any more. – DisgruntledGoat – 2011-07-22T11:44:43.660

This works in the latest version of Chrome (21.0.1180.89) -- right-click on username and password form fields, "Inspect Element". Change autocomplete="off" to autocomplete="on". Then submit form. – Dolan Antenucci – 2012-09-04T14:52:37.570

Works with FF but I did not get it to work with Salesforce in Chrome Version 33.0.1750.152 Ubuntu 12.04 (256984).. – jcalfee314 – 2014-05-16T17:48:10.780

5

Here is a bookmarklet that removed the autocomplete. Create a new bookmark on your toolbar and save this long line as the url:

javascript:(function(){var%20ca,cea,cs,df,dfe,i,j,x,y;function%20n(i,what){return%20i+"%20"+what+((i==1)?"":"s")}ca=cea=cs=0;df=document.forms;for(i=0;i<df.length;++i){x=df[i];dfe=x.elements;if(x.onsubmit){x.onsubmit="";++cs;}if(x.attributes["autocomplete"]){x.attributes["autocomplete"].value="on";++ca;}for(j=0;j<dfe.length;++j){y=dfe[j];if(y.attributes["autocomplete"]){y.attributes["autocomplete"].value="on";++cea;}}}alert("Removed%20autocomplete=off%20from%20"+n(ca,"form")+"%20and%20from%20"+n(cea,"form%20element")+",%20and%20removed%20onsubmit%20from%20"+n(cs,"form")+".%20After%20you%20type%20your%20password%20and%20submit%20the%20form,%20the%20browser%20will%20offer%20to%20remember%20your%20password.")})();

bugaboo

Posted 2009-09-22T22:14:15.030

Reputation: 51

2Everything except ie has a selector query, so you can use much shorter version: var e= document.querySelectorAll("input[autocomplete=off]"); for(var i=0; i<e.length; i++) { e[i].setAttribute("autocomplete", "on"); } – Nux – 2013-04-29T06:55:02.793

4

In Chrome right click the desired field and "Inspect element"

  • Change autocomplete="off" to autocomplete="on"
  • Input data and submit the form
  • Chrome will ask you to remember the password
  • When you return, it may not display the password until after you attempt submitting once.

Kelly

Posted 2009-09-22T22:14:15.030

Reputation: 41

3

For some websites, Firefox will let you save the password where Chrome will not. So you can save the password in Firefox, and import it into Chrome.

  1. In Chrome, go to SettingsImport bookmarks and settings
  2. Select Mozilla Firefox
  3. Uncheck everything except Saved passwords (check Autofill form data as well if you also want Chrome to autofill the username).
  4. Click Import

These instructions are based on Chrome version 62.

This answer is based on floatingstar's answer on a similar question.

wjandrea

Posted 2009-09-22T22:14:15.030

Reputation: 497

2

Instead of relying on the webpage to support password saving, you can instead overwrite the whole page with an HTML form that is guaranteed to work:

  1. Press Ctrl+Shift+I
  2. Click on the "Console" tab
  3. Paste the following JavaScript into the console and press Enter

    document.getElementsByTagName("body")[0].innerHTML='<form action=# method=post><input name=identifier><input type=password name=password><input type=submit></form>'

  4. Important: Close the developer panel by pressing Ctrl+Shift+I again; otherwise your browser won't display the password save dialog.

  5. Enter the username and password you want your browser to save, then click "Submit".
  6. Your browser should then confirm if you would like to 'remember' these credentials.

Screenshot:

Screenshot

samdd

Posted 2009-09-22T22:14:15.030

Reputation: 1 616

Also works in Edge! – wjandrea – 2017-10-30T20:52:41.157

This works great for my company's site that has a few password fields on the same page. Thanks! – wjandrea – 2018-05-09T20:46:15.790

2

From Stable Channel Update:

Chrome will now offer to remember and fill password fields in the presence of autocomplete=off.

This feature has been implemented in the Google Chrome 34.0.1847.116 Stable channel for Windows, Mac, and Linux.

user1014639

Posted 2009-09-22T22:14:15.030

Reputation: 151

Unfortunately, this doesn't work with the Hipchat email/username field, I think because it's on a separate page from the password field. – wjandrea – 2017-11-01T20:24:39.503

1

I just entered my username and password in the value fields in the form by inspecting the elements and saved that as a html page, grabbed url from that page and I book marked this new url, its working for me :). Thanks.

pretty

Posted 2009-09-22T22:14:15.030

Reputation: 11

Thanks! :) Nothing above worked for me somehow, except your solution! – Crocode – 2015-10-08T23:49:22.320

Could you explain this in more details? It's a little vague what you're saying. Maybe show a screenshot? – slm – 2013-06-18T16:36:08.273

2If I understand you, instead of going to example.com/login, you now visit file://my_copy_site.html and log in, which redirects you to example.com/main_page. If that's true, clever, but beware that the real site may change out from under your copy; eg, your form might submit to a URL that they've removed. – Nathan Long – 2013-06-18T18:31:28.277

0

You can use the Roboform Chrome extension.

NT.

Posted 2009-09-22T22:14:15.030

Reputation: 1 677