简体   繁体   English

为什么我的网站上的所有html表单都禁用Internet Explorer自动完成功能?

[英]Why is the Internet Explorer Autocomplete feature disabled for all html forms on my website?

When Internet Explorers AutoComplete is turned on for Forms the entries for each field in the HTML form should be cached and displayed as a prompt when the user starts entering content into the form the second time around. 当Internet Explorer的“表单自动打开”功能打开时,HTML表单中每个字段的条目应被缓存,并在用户第二次开始向表单中输入内容时作为提示显示。

On my website the AutoComplete feature is never displayed for any forms that exist on that site. 在我的网站上,从不显示该网站上存在的任何表单的“自动完成”功能。 But yet other websites retain and deliver that content without problem. 但是还有其他网站可以毫无问题地保留和交付该内容。

My site is using PHP as the scripting language and all content is delivered over SSL. 我的网站使用PHP作为脚本语言,并且所有内容均通过SSL交付。

I have determined that the problem is related to the Cache-Headers PHP sends out when the start_session() command is issued and the site is running SSL. 我已确定问题与发出start_session()命令且站点正在运行SSL时PHP发送的Cache-Headers有关。

I have been able to get a hold of a person on the IE security team at Microsoft and they have confirmed that this is how IE is supposed to work. 我已经在Microsoft的IE安全团队中占有一席之地,他们已经确认这就是IE应该工作的方式。 Here is a direct quote from the email. 这是电子邮件的直接报价。

"This is considered a feature of the autocomplete system. Significant code was written to make it behave this way." “这被认为是自动完成系统的功能。编写了大量代码以使其具有这种行为。”

When session_start(); 当session_start(); is issued the default http headers php sends out are a no-cache header. 发出php发送的默认HTTP标头是一个没有缓存的标头。 Here is another quote from the Microsoft representitive. 这是Microsoft代表的另一句话。

If a secure page says "Don't cache me", that's an indication that the data is sensitive, and hence the autocomplete data itself is likely sensitive. 如果安全页面上显示“不要缓存我”,则表明数据是敏感的,因此自动完成数据本身很可能是敏感的。 Admittedly, it is a simple heuristic. 诚然,这是一种简单的启发式方法。 Personally, I think it's a bit silly, but it's been there forever. 就个人而言,我认为这有点愚蠢,但是它一直存在。 It's probably a good suggestion to support "autocomplete=on" to override the default heuristic. 支持“ autocomplete = on”以覆盖默认启发式可能是一个很好的建议。

In order to re-enable the autoComplete feature I had to issue this command in php before the start_session() command: 为了重新启用autoComplete功能,我必须在start_session()命令之前在php中发出以下命令:

session_cache_limiter ('private, must-revalidate');

I'm sure there are other ways of manipulating the header cache-controls to allow the autoComplete to function as well. 我确信还有其他方法可以处理标头缓存控件,以使autoComplete也起作用。

Here is a link to 3 examples forms I made so you can test with IE. 这是我制作的3个示例表单的链接,因此您可以使用IE进行测试。

dgavey - how are your forms being submitted? dgavey-您的表格如何提交? Microsoft isn't overly clear about this subtle issue, but; 微软对于这个细微的问题不是很清楚,但是;

YOU HAVE TO SUBMIT YOUR FORMS WITH A SUBMIT BUTTON

for this to work! 为了这个工作!

Unless of course you are like every site out there that likes to design their own forms thank you very much, and thus you'll need this hack to make IE behave . 当然,除非您像那里的每个站点一样喜欢设计自己的表单,否则非常感谢您,因此您将需要此hack来使IE发挥作用

http://webbugtrack.blogspot.com/2007/08/bug-137-ie-autocomplete-hardly-ever.html http://webbugtrack.blogspot.com/2007/08/bug-137-ie-autocomplete-hardly-ever.html

which points the KB article here , where MS explains this really odd behavior. 这将KB文章指向此处 ,MS解释了这种真正奇怪的行为。

表单元素中是否有autocomplete="off"作为属性?

使用SSL时,IE中不会使用自动完成功能(这在您的标记中有所提及,但在您的问题中并未提及)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的图片上传器可以在除Internet Explorer之外的所有浏览器上使用? - Why is my image uploader working on all browsers except Internet Explorer? 在Internet Explorer 8中打开网站时出现的问题 - Problems in my website when opened in Internet Explorer 8 Bootstrap 3自动完成功能无法在Internet Explorer 9中运行 - Bootstrap 3 Autocomplete not working in Internet Explorer 9 自动完成功能不会显示在Internet Explorer中 - autocomplete does not display in Internet Explorer 将用户从 Internet Explorer 重定向到 php/html 网站上的 Chome - redirect user from Internet explorer to Chome on php/html website 防止我的PHP网站在Internet Explorer浏览器上打开 - Prevent my PHP website from opening up on Internet explorer Browser 为什么我的代码在本地主机上的Internet Explorer版本8上不能在服务器上运行,而在Internet Explorer版本10上却不能运行 - Why does my Code work on Internet explorer version 8 on localhost not on server, but not on internet explorer version 10 为什么JavaScript样式可用于Internet Explorer以外的所有浏览器? - Why is JavaScript styling working with all browsers except Internet Explorer? 为什么我的页面无法在Internet Explorer中正确显示? - Why doesn't my page display correctly in Internet Explorer? 为什么我的搜索代码在Internet Explorer上不起作用 - why my search code does not work on internet explorer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM