本文介绍了iFrames Iexplorer不会写入或读取会话(或Cookie)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个表单来逐步提交数据。在步骤1到步骤2之间的步骤之间,等等。需要这些数据。 50%的访问者使用iframe从不同的网站访问表单。



最初,数据存储在Cookie中。这在几乎每个浏览器,除了iexplorer。我用P3P玩了几天,但放弃了。没有什么改变。然后我读了会话没有这个问题。所以我把整个登录系统改变为会话。



现在我正在测试系统,仍然每个浏览器使用iframe中的表单,除了粗糙的Iexplorer。

有什么我可以做吗?



更新:服务器在另一个时区,而它位于我的时区。改变时区是应该帮助,但没有。

解决方案

花了一些时间,但它解决了。我们去:


  1. 有时候时区不正确。如果差异超过一个小时,Iexplorer会话将被破坏inmidiatelly。您可以手动更改时区或要求您的webhoster这样做。在PHP中,您可以尝试: date_default_timezone_set(string $ timezone_identifier)


  2. 不可能留在一小时内。如果是这样,您可以更改会话缓存过期设置。在PHP中它<?php session_cache_expire(1440); ?>


  3. IE iframes显然有下划线的问题。当使用下划线时,IE拒绝该Cookie。


  4. 使用P3P(检查它是否合法允许等等)。 。在PHP中,您可以使用 header('P3P:CP =IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT');

    / li>

这是我试过的,他们一起工作(不是自己)。


I built a form to submit data step by step. In between steps data is carried on from step 1 to step 2 and so on. That data is needed. 50% of the visitors access the form from different sites using an iframe.

Initially the data was stored in cookies. That worked in almost every browser, except iexplorer. I played for days with P3P but gave up. Nothing changed whatsoever. I then read that sessions didn't have this problem. So i changed the whole loginsystem to sessions.

Now I am testing the system and still every browser works using the form in an iframe, except ofcoarse Iexplorer.

Is there anything i can do?

Update: The server was in another timezone while it was located in my timezone. Changing the timezone was supposed to help, but didn't.

解决方案

Took some time, but it's solved. Here we go:

  1. Sometimes the timezone is incorrect. If the difference is more than an hour, Iexplorer sessions will be destroyed inmidiatelly. You can change the timezone manually or ask your webhoster to do so. In PHP you can try: date_default_timezone_set(string $timezone_identifier)

  2. In addition to 1, sometimes it's impossible to stay within an hour. If so, you can change the session cache expire settings. In PHP it's <?php session_cache_expire(1440); ?>

  3. IE in iframes apparenty has an issue with underscores sometimes. When using underscores, IE rejects the cookie. So don't use them or make sure that IE doesn't store it's sessions that way.

  4. Use P3P (check if it's legally allowed and such!). In PHP you could use header('P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

That's all i tried and together they worked (not on their own).

这篇关于iFrames Iexplorer不会写入或读取会话(或Cookie)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 07:50