how to preventing sharing persistent socket with two different tabs of same browser
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to preventing sharing persistent socket with two different tabs of same browser
hello
I have problem with persistent socket in php my problem is when I open a new tab of firefox, opera or chrome (but not Internet explorer) they share an existing persistent socket which is opened with pfsockopen function by first tab and does not open new persistent socket (which is Internet explorer does) what should I do in firefox (or related explorers) or in my code to open new socket for each new tab.
this is my sample code:
I would suggest that this behaviour is positive and should not be deemed to be a "problem" at all. Your PHP code certainly has no say in how the browser chooses to manage the connections. You can tell a connection to be kept alive, or you can force it to shut, andything past that is outside of the remit of HTTP/1.1.
Does opening a new firefox window do anything? I presume not, but it's worth checking. Other than that, load a different profile, or a different browser. Privay modes are useful for quick ways of testing two different sessions from the same browser instance too.
There are lots of things that don't behave the way we want them to. You can either hold your breath until you turn blue or they change it (what shade of blue do you like?), or you can adapt. Most of the rest of us find that adapting is a big part of the challenge. It's part of writing applications for portability.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.