Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of missing new window cookie

Shulou Source: shulou.com Published: 2022-06-03 06:56:56 11月15日 Update

This article introduces the relevant knowledge of "how to solve the problem of missing cookie in the new window". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Today, someone in a group asked about the open that uses js in ie6 and found that session could not be obtained in the new window.

After testing with the following test code, it is found that because phpsessionid storage is a process-level validity period, it can only be obtained by the same process. Many people say that a new ie process will be opened after open or target= "_ blank".

Therefore, the phpsessionid of the previous window does not follow the new window, resulting in not getting it.

My own tests use ietest,6/7/8 (9 doesn't start, I'm not sure), and all have the same situation.

However, this does not exist using the ie10 test that comes with windows.

Chrome is also multithreaded, but this is not the case.

This situation does not exist in firefox.

Index.php

The copy code is as follows:

Tags: Code testing situation process problem content more knowledge practical effective the same learning and then the kernel only dilemma practice common use articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno Microsoft Linux Xiaomi