I'm working on a page that takes credit cards. Everything works great except when the user goes back to place another order, IE/Firefox/etc. saved the form data and is displaying the credit card used previously. Is there a way to prevent a browser from storing (caching) certain fields so this doesn't happen?

I thought about generating a random value and using that as the field name but then I end up having to deal with things like card declines and new field names. Was hoping there was a simpler way...


9 Years
Discussion Span
Last Post by MidiMagic

Preferably try to make each and every of such pages secure by using ssl.. i.e. https... with this it will not save the form data... and everytime request a new data...


That's the funny thing, the site is SSL yet when i start to type in the field, a dropdown from the browser appears with other things typed in. Doing it for both IE and Firefox. I found AutoComplete="off" but this invalidates the HTML... I would think that if the site is SSL, it wouldn't save things...


It's a setting in the browser, and belongs to the user, not to the web developer. The user must set these values.

AutoComplete= is a nonstandard IE extension. This is why it won't validate.

Can you write empty strings into these fields with your script, before allowing the user to enter values?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.