Mobile app version of vmapp.org
Login or Join
Murphy175

: Form autocompletion not working I created a HTML form with several input fields, nothing special. Using the most recent version of Google Chrome and Firefox autocompletion works for all form fields

@Murphy175

Posted in: #Forms #InternetExplorer

I created a HTML form with several input fields, nothing special. Using the most recent version of Google Chrome and Firefox autocompletion works for all form fields which means that whenever I want to refill the form the browsers suggest former input values for the fields.

In IE8 it does not work at all. Other forms do work but on mine IE does not remember a single input value. The form is SSL encrypted but I don't think that's the reason because I tried other SSL forms which work. Any tipps? Thanks!

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy175

2 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer257

According to the MSDN article on Autocomplete, the issue isn't SSL alone, but rather a combination of SSL and the cache headers being sent out by your server:

Note: if both of the following conditions are true:
1. The page was delivered over HTTPS
2. The page was delivered with headers or a META tag that prevents caching

...the Autocomplete feature is disabled, regardless of the existence or
value of the Autocomplete attribute. This remark applies to IE5, IE6,
IE7, and IE8.




So if you're serving a page over ssl, you'll need to modify the Cache-control headers your server is sending to private, must-revalidate to allow IE autocomplete to work on these pages.

This has come up a couple of times on stackoverflow, with this answer being particularly informative, including confirmation from an MS engineer that IE is designed to work this way.

10% popularity Vote Up Vote Down


 

@Marchetta884

Normally autocomplete "just works" unless you actively disable it (either by setting autocomplete="off" attribute on your form or input elements or by disabling it via Tools > Internet Options > Content tab).

However, IE does have a propriety way of telling an INPUT field what type of autocomplete field you are using. It uses the VCard naming scheme to do this. This is best shown in an example:

<input type="text" name="email" vcard_name = "vCard.Email" />

<input type="text" name="officephone" vcard_name = "vCard.Business.Phone" />


You can read more about this in the MSDN article 'Using AutoComplete in HTML Forms'. Note this is quite old so not sure how relevant it is to IE8, but I presume it is still in use.

Just a word of warning: The vcard_name and autocomplete attributes are propriety to IE and are not standard (X)HTML and therefore if you use them your page will not validate. I would personally avoid them, but see if it makes any difference.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme