Session issues with firefox

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vaanil
Forum Newbie
Posts: 1
Joined: Thu Sep 08, 2005 3:32 am

Session issues with firefox

Post by vaanil »

Hi,


I understand that firefox browser carries the same session over various windows/tabs even if we open a totally new window from task bar icon.

I've one web page which help users to manage files over many machines and it will take time to load when they choose to perform some actions like compress or delete large number of files over the network. When I use firefox, I cant load the same site on a different window/tab to do some other tasks while waiting for the first action to finish. It waits for the first page to finish loading then it loads the second page. No issue with IE, if I open two different window from the task bar. Obviously as both of them having two different session. I can surf through the site or perform other actions while waiting for the first one to finish.

Is there anything I can do with PHP to work around this issue? I'm using PHP on Linux with Apache.

Thanks.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

I use a separate unique identifier for things which are likely to be put on tabbed areas. When loading a page new I use this piece of code

Code: Select all

if (!isset($_REQUEST['uid'])) {
        $uid=uniqid(1, true);
    } else {
        $uid=$_REQUEST['uid'];
    }
All the session specific for that page is stored as $_SESSION['uid'][values].
When redirecting etc I then use output-add-rewrite-var to ensure all the subsequent pages use this uid.
Post Reply