Labels

Bollywood (283) Education (162) General News (21) Technology (120) Top 10 (206)

Sunday, 29 May 2016

How to Force the Browser to Remember Password

when you enter your username and password to log in to a website, Google chrome show you a notification under the URL field, is saying that remember your password. If you accept, the chrome save the password of that site and next time you open that site, it will autofill the username and password fields for you to login again.

The password saving feature is available in the new versions of browsers but some websites disable this option for their login forms for security reasons, For example, the paypal website doesn't allow the browser to remember your password and every time log in to paypal, you'll be forced by the website. Some banks websites do that as well for security purpose.
TLDR- Use the remember password extension for chrome and it will force the browser to remember password of that site who doesn't allow to do that.

How Websites Disable Password Saving

Websites can easily disable the auto fill option forms by setting auto-complete=off for the password field. For example if the login form is written as below, the browser will never notify you to save the passwords field because auto-completion is turned off.
  1. <form>
  2. <input type="text" name="username">
  3. <input type="password" name="password" autocomplete="off">
  4. </form>

Force the Browser to Remember Password

Now you know that how websites turn off the option to remember password, problem is getting around simple.

You can set the auto-complete attribute of the password fields on a website to turn on if they are off and you will be able to save your passwords. Here is some javascript that will help you to automatically turn on auto-complete for all password fields on a website.
  1. var fields = document.querySelectorAll('input[type="password"]');
  2. for (var i = 0; i < fields.length; i++) {
  3. fields[i].autocomplete="on";
  4. }
You don't have to take tension about the code. There is a simple extension for chrome too "Remember Password". This extension do it automatically for you.

Install Remember Password chrome extension and then open a website like paypal or another banking websites. Login with your username and password and the browser will now notify you to remember password.

0 comments:

Post a Comment