3

I have a look at many pages on the web and many methods mentioned on that pages as Disable browser 'Save Password' functionality but none of them working properly for all browsers. One of the best method in these pages as shown below; but id does not work in Chrome. Is it possible make browser not to remember password field in MVC? Please do not suggest the known solution method as "autocomplete=off" without testing it on all of the latest version of the major browser.

Plunk - http://plnkr.co/edit/xmBR31NQMUgUhYHBiZSg?p=preview

<form method="post" action="yoururl">
    <div class="hidden">
    <input type="password"/>
    </div>
    <input type="text" name="username" placeholder="username"/>
    <input type="password" name="password" placeholder="password"/>
</form>

<style>
    .hidden { display: none; }
</style>
Community
  • 1
  • 1
Jack
  • 1
  • 21
  • 118
  • 236
  • yes it works on Chrome.... – Aristos May 17 '16 at 12:08
  • No, not working for Chrome version Version 50.0.2661.102 m. On the other hand, when try this code in a different form, but when use this hidden div, the form cannot be post. – Jack May 17 '16 at 12:19
  • Adding autocomplete="off" works in Chrome Version 50.0.2661.102 in your Plunker example. But look at this post: http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag – Ed DeGagne May 17 '16 at 12:44
  • @EdDeGagne Many thanks for your reply, but I already look at that page and the only solution that works is above example. On the other hand, when I use this hidden div, the form cannot be posted. Any idea? – Jack May 17 '16 at 13:35
  • @Aristos Any idea for this issue? – Jack May 17 '16 at 13:35
  • try it to place it on the form tag (the autocomplete=off) – Aristos May 17 '16 at 17:59
  • @Aristos I will give a try tomorrow, but as far as I remember from the posts regarding to this issue it did not make any sense. On the other hand it is really very interesting not being able to make the browser suggest to save the password field or make the password field clear for all of the major browsers. It would be OK if we could by using Javascript, Html or any other technology I.e. Razor, CSS, etc. Any help would be apreciatled. – Jack May 17 '16 at 20:38
  • @binary suggestion, get on any bank site to see their html code to see what they do... – Aristos May 17 '16 at 20:56

0 Answers0