ie and session loss (new window cookie loss) actual measurement and solution_PHP tutorial
WBOY
Release: 2016-07-21 15:00:46
Original
1020 people have browsed it
Today in a group, someone asked about the use of js open in IE6, and found that the session could not be obtained in the new window. After testing with the following test code, it was found that the phpsessionid storage is a process-level validity period, and only the same process To get it, many people say that after opening or target="_blank", a new IE process will be opened. Therefore, the phpsessionid of the previous window will not follow the new window, so it cannot be obtained. My own tests use ietest, and the same situation occurs on 6/7/8 (9 cannot be started, not sure). But this situation does not exist when using the ie10 test that comes with Windows. Chrome is also multi-threaded, but this situation does not exist.
From the test, if the cookie setting is delayed and scheduled to expire, rather than at the process level, it can also be seen after opening, So, In response to this situation, to prevent users from losing their login status when using the IE kernel, it can be used with cookies. The PHP configuration provides a way to automatically add the sid to the uri, but the relative path will not be automatically added. However, the extreme situation of cookie being disabled is rarely encountered. Cookie+session is enough to cope with common situations.
http://www.bkjia.com/PHPjc/328039.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/328039.htmlTechArticleToday someone in a group asked about using js open in ie6, and found that the session could not be obtained in the new window , after testing using the following test code, it was found that the reason is that phpsessionid is stored at the process level...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn