Did you know this “autocomplete” attributes in HTML tag family?

First 4 digits of a credit card
Image via Wikipedia

Ah! Do you guys know about this? Honestly I was not aware of this attribute till yesterday. It’s one of the good to have attribute for all the form tags; it helps in building security for payment related projects.

Recently I had to resolve a problem in one of the ecommerce project where user has to enter their credit card info to process the payments. The problem is the <input> tag was throwing the suggestion on the credit card number; it was retaining the credit card number & other few data even when any other user logs into the same page on the same machine.

After some googling I found the solution to the problem. It’s not exactly a problem but it’s one of the features given by the browsers to avoid entering the data on same <input> tags again and again. This is especially dangerous if someone enters their credit card number from a public computer. Hence to make sure the process is secure, use “autocomplete” attribute in your <form> tag.

For ex:
<form name=”cc” autocomplete=”off” >

Our engineers out there have come up with an extra attribute called “autocomplete” which accepts the value of boolean and depending on the value it tells the browser to hide/show the pre-existing data.

Let’s secure it!

Did you know this “autocomplete” attributes in HTML tag family?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s