There is a form with the "City" field, jQuery autocomplete is made for the field, after each user action the entered text is sent via ajax to the php script, which in turn returns an array with the list of cities found by the entered text. The found cities are displayed in a special beautiful container below the input field, where they can be selected by the user http://joxi.ru/eAOqKQWHolqYmo .

Recently, the browser began to remember the previously entered values ​​and display a hint in parallel with our container of cities found on the fly http://joxi.ru/52a1M7Btaq3420 . An attempt to prohibit memorization using the autocomplite = "off" attribute for the form field did not lead to success. In addition, Jquery validation began to swear on the field.

That's actually the question, how to prevent the browser from remembering the values ​​entered into text fields? Or at least not to show them as a hint?

  • A typo? Correctly autocomplete . - VladD
  • In principle, you can not prohibit the user agent to show user-friendly things, you can only ask him about it. </ bore mode off> - VladD
  • those. will not work, I understood correctly? (yes in autocomplete it was possibly sealed). - maler1988
  • Well, most browsers are autocomplete = off. But no one can give you a guarantee, the browser has the right to deviate from the standard. - VladD

2 answers 2

Such a topic was raised on the original SO and marked as resolved.
https://stackoverflow.com/a/582292/272885

Modern browsers support the autocomplete attribute on the form , not on the input path. IE once worked with the input attribute of the same name, but switched to standard behavior with v11.

    The topic is old, but suddenly someone will find a solution:

     <input type="password" name="password" value="" id="password" readonly onfocus="this.removeAttribute('readonly')"> 
    • In FireFox, it turned out that this hack is costly by clicking on the tab, to solve this, add autocomplete = "off" to the form tag - Denis Tolstunov