0

How can i disable save password prompt from all the browser?

I have tried This way but this is not working for me because by setting input type text is a security reason and also this works only on Chrome and Firefox(Moz) I need it in all browsers. is it possible to disable browser save password prompt ? one can help me in this issue?

Waris Sarwar
  • 130
  • 1
  • 12

2 Answers2

1

No, you can not change this functionality because it is not JavaScript that is performing those prompts, regardless of the browser. Each browser has their own implementation of this "Save Password" functionality and none of them expose it to JavaScript, as that could be a potential security risk.

There are a few different "hacks" (such as the one that you linked) that will work sometimes, but they are not guaranteed and there is no cross-browser implementation that will do what you are requesting.

th3n3wguy
  • 3,166
  • 2
  • 20
  • 28
1

So here you go! with help of This Link

 window.onload = function() {
        init();  }

    function init() {
        var x = document.getElementsByTagName("input")[0];
        var style = window.getComputedStyle(x);
        console.log(style);

        if (style.webkitTextSecurity) {
            // Do nothing
        } else {
            x.setAttribute("type", "password");
        } }

CSS

 input {
        text-security: disc;
        -webkit-text-security: disc;
        -moz-text-security: disc;
    }
Waris Sarwar
  • 130
  • 1
  • 12