The site has a registration form , in chrome, after entering all the data and submit, the browser offers to save the username and password. And he can not identify the login and it turns out this (screen).

enter image description here

On the form is the property autocomplete="off" .

Tell me how to disable it, even in the form of authorization, this is the norm, but when registering, saving should not work.

    3 answers 3

    In general, saving passwords in a browser is a feature of the browser itself.
    And for each client is determined by the settings of his browser.
    Well, as an option, use XHR requests.
    No form submission - no suggestion to save a password! ))

    • There are registration forms on other sites where the browser does not offer to save data, in the properties I did not notice anything that could disable memorization. But they somehow do it. - Big Tree
    • In any case, it is a crutch. Save the password or not - this is the browser setting, it does not change. Which crutch to use is up to you)) I suggested xhr there is an answer below) - sepgg

    There is a very crooked hack with the addition of an invisible input at the very beginning of the form and the removal of the input with the password just before sending the form. Chrome does not find the password input and does not try to save it:

     var password = $("#password"); $("#hiddenPassword").val(password.val()); password.val(""); password.attr("type", "text"); myForm.submit(); 

      Wrong way

      In order not to save the password, just do not submit the form. Use XMLHttpRequest to send form data. Users will hate you, but who cares?

      The right way

      Make a normal form with a login so that the browser does not demolish the brain. If email will be used as a login, then put it first and give the field a normal name (well, or whatever Chrome wants). Remembering passwords is convenient.

      PS To shove a bunch of optional fields in the registration form is a bad form. Scares users from registering.

      • The principle of registration in the future will be redone. To first enter only the mailbox. and the rest of the data is already when the user enters the control panel through a link in the letter. But it will be in the future. Although, if we take as an example these forms signup.live.com/signup or this appleid.apple.com/account guys are not at all soared on the topic of entering 9000+ fields in the form - Big Tree
      • one
        @BigTree They do not soar, because registration is not bypassed. :) - Athari
      • Wrong, it’s suggested to save the password when entering it not for entering, but for changing personal data, such as deleting a questionnaire or changing a name. My users need to be protected from the curves or random actions of colleagues, family men, children, etc. Once remembered and anyone who goes into the open computer, will be able to change or delete important data with one click. So for logging into your account, this is please, and for changing important data, only manually entering a password! Who has forgotten the password, will look at it through the browser, but random people or actions will not spoil the mess. - iSavaDevRU