为什么我的网站上的所有html表单都禁用了Internet Explorer自动完成功能? [英] Why is the Internet Explorer Autocomplete feature disabled for all html forms on my website?

查看:168
本文介绍了为什么我的网站上的所有html表单都禁用了Internet Explorer自动完成功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当为Forms启用Internet Explorers AutoComplete时,HTML表单中每个字段的条目应缓存并在用户第二次开始在表单中输入内容时显示为提示。

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.

在我的网站上,该网站上的任何表格都不会显示自动完成功能。但其他网站保留并提供该内容没有问题。

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.

我的网站使用PHP作为脚本语言,所有内容都通过SSL提供。

My site is using PHP as the scripting language and all content is delivered over SSL.

推荐答案

我已经确定问题与发出start_session()命令并且网站运行SSL时PHP发出的Cache-Headers有关。

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.

我已经能够在微软的IE安全团队中找到一个人,他们已经确认这是IE应该如何工作的。这是电子邮件中的直接引用。

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. 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."

当session_start();发出默认的HTTP头,php发出的是一个无缓存头。以下是Microsoft代表的另一个引用。

When session_start(); is issued the default http headers php sends out are a no-cache header. Here is another quote from the Microsoft representitive.

如果安全页面显示请勿缓存我,则表明数据是敏感,因此自动填充数据本身可能很敏感。不可否认,这是一个简单的启发式方法。我个人认为这有点傻,但它永远存在。
这可能是一个很好的建议,支持autocomplete = on来覆盖默认启发式。

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功能我必须在php 之前发出此命令 start_session()命令:

In order to re-enable the autoComplete feature I had to issue this command in php before the start_session() command:

session_cache_limiter ('private, must-revalidate');

我确定还有其他方法可以操作标头缓存控件以允许autoComplete运行还有。

I'm sure there are other ways of manipulating the header cache-controls to allow the autoComplete to function as well.

这是3个例子的链接我制作的表格,你可以用IE测试。

这篇关于为什么我的网站上的所有html表单都禁用了Internet Explorer自动完成功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆