0

Please see the screendump of a login page im working on with the code showing in Firebug beneath. As you can see there are two input boxes, one with the placeholder 'Enter username' and one with the placeholder 'Enter password'. Both inputs have an empty default value.

I cannot figure out why, bet despite the placeholder text and default values being set as they are, the input boxes seem to have a mystery default value as shown in the screendump i.e. 'root' and whatever password is entered.

No matter if I have a default value or not it seems to make no difference. How can I stop it from having these mystery default text values?

I am running apache on a linux machine to test these and so far have not tried them on a real server, dont know if this may make a difference.

Many thanks

  • do they still have these values when you hit ctrl+f5? – Dziad Borowy Jan 20 '14 at 17:07
  • Haven't you attempted to log in with these and hit "save password" in your browser? – MueR Jan 20 '14 at 17:10
  • 1
    if you don't want autocomplete on this inputs you can use the `` to prevent the browser complete it with cache or saved passwords – Pablo Martinez Jan 20 '14 at 17:12
  • A similar question has been asked, this might be of help: http://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag – mcolo Jan 20 '14 at 17:15
  • Does this happen initially, or only after the field has been focused? You should include sufficient code to reproduce the problem, as text in the question itself. – Jukka K. Korpela Jan 20 '14 at 17:42

1 Answers1

0

There may be many reasons why this is happening :

  1. Your browser is picking previously added values (Try hitting ctrl + F5 or clear cache of browser)

  2. You have saved the credentials in your browser (Try delete the saved credentials in your browser)

  3. Some autocomplete function is running (As mentioned in the comment above use autocomplete="off" in your text fields)

I hope this will help you.

Aman Chhabra
  • 3,824
  • 1
  • 23
  • 39
  • Thanks to all, I added autocomplete="off" as suggested and this cleared up the problem right away. All that confuses me is that I had never entered the mystery credentials into that form, and had cleared my cache many times and even used different browsers. – Green Gremlin Jan 21 '14 at 09:19