设置标头可能会带来哪些危害:P3P: CP=“CAO PSA OUR”
该标头用于允许 IE 中通过 iframe 进行跨域请求。我已经测试过添加这个,我的代码现在在 IE 中按预期执行。
添加此标头可能会带来什么危害?
The header is used to allow cross domain requests in IE through iframes. I've tested adding this, and my code executes as expected now in IE.
What possible harm could come from adding this header?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于……你信任你陷害的每个人吗?你相信所有陷害你的人吗?你知道我不会陷害你,然后改变你页面的内容吗?
有一个合适的 HTML5 解决方案:postMessage(例如 http://html5demos.com/postmessage2)。这可以让你建立信任关系等。jQuery
甚至有一个包装器插件来封装它,如果浏览器不支持 HTML5 postMessage,则使用 #anchor 技巧:
http://benalman.com/projects/jquery-postmessage-plugin/
http://plugins.jquery.com/plugin-tags/postmessage
请注意安全,不要关闭浏览器启用的安全功能...:)
It depends... Do you trust everyone you frame? Do you trust everyone that are framing you? Do you know that I don't frame you, and then alter the content of you page?
There is a proper HTML5 solution for this: postMessage (se e.g. http://html5demos.com/postmessage2). This lets you set up trust relationships etc.
jQuery even has a wrapper plugin that encapsulates this, and uses an #anchor trick if the browser does not support the HTML5 postMessage:
http://benalman.com/projects/jquery-postmessage-plugin/
http://plugins.jquery.com/plugin-tags/postmessage
Be security aware, don't turn off browser-enabled security features... :)