title: Is there a way to code the disabling of saving passwords in modern browsers (like Chrome 42)?
body: <p>I have a asp.net/MVC/Razor project that the client has requested not save username and passwords.  I've found multiple sites saying that autocomplete = "off" or autoCompleteType = "disable" should work, but they don't work for me in Chrome 42.  I've seen sites that say autocomplete is in HTML5 and should work, but I've also seen sites that say it is NOT supported by modern browsers.  My questions are:</p>
  
  <ol>
  <li><p>Can someone give me a definitive answer on whether there is a way to block saving passwords in modern browsers?  And, if there is, how to do that?</p></li>
  <li><p>If this can't be done, can someone point me to a website that explains that this can't be done in modern browers?  I don't want a stackoverflow comment or message board discussion; I need a definitive, clear, professional explanation that I can show to the client explaining why this can't be done in a simple way.</p></li>
  </ol>
  
  <p>Here are a couple sites that seem to disagree with each other:</p>
  
  <p>"IE11 dropped support for autocomplete=off for input type=password at both the form and element level."
  <a href="https://stackoverflow.com/questions/19229507/how-to-disable-autocomplete-for-a-html-password-field-in-ie11">How to disable autocomplete for a HTML password field in IE11?</a></p>
  
  <p>"HTML5 has an autocomplete attribute which can be specified as either on or off in a field."
  <a href="https://stackoverflow.com/questions/13568609/autocomplete-text-input-for-html5">Autocomplete text input for HTML5?</a></p>
  
  <p>Here is the code I've use with the autocomplete tags:</p>
  
  <p>In the form:</p>
  
  <pre><code>@using (Html.BeginForm("Login", "Admin", FormMethod.Post, new { @autocomplete = "off", @autoCompleteType = "disable"}))
  </code></pre>
  
  <p>In the input tags:</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.UserName, new { @class = "span12", @autocomplete = "off", @autoCompleteType = "disable" })
  @Html.PasswordFor(m =&gt; m.Password, new { @class = "span12", @autocomplete = "off", @autoCompleteType = "disable" })
  </code></pre>
  
  <p>I also tried enabling autocomplete through javascript:</p>
  
  <pre><code>$("input:text,form").attr("autocomplete", "off")
  </code></pre>
  
  <p>Also tried setting the text boxes to blanks, but the values still get populated by the browser:</p>
  
  <pre><code>$("#UserName").val("");
  $("#Password").val("");
  </code></pre>