Hi all,

I have a somewhat philosophical issue I would be interested to see others opinions on. I have a site that receives several values via the querystring that are necessary for use throughout the site. By default other links internal to the site do no include these values, so to persist the data I am pulling them into session variables, which are used on subsequent pages.

I am having issues now where users are opening multiple instances of the site in different tabs of their browser. The session then becomes common accross all of these tabs, and this there have been occurrences of data contamination.

How would you approach a solution to this problem?
Are there perhaps some alternate options for persisting this data on a per-instance basis?

Recommended Answers

All 4 Replies

How would you approach a solution to this problem?

I'd try to find out what the reason is of opening your site in multiple tabs first.

I want to say "Because...users...!"

We have told them not to, but we also told them they have to use IE since IE is the only browser that supports javascript access to the local filesystem (its an intranet) but they still use firefox.

TBH, a valid use case would be; they are working on one clients file, recieve a phone call from a different client and have to open that file but don't want to lose the work they haven't finished for the first client.

Though not currently catered for in the project spec, or system design, it would be nice if I could prevent them from screwing up their data - aka making more maintenance work for me. I'm just not sure how to go about it without using the session, unless there is some way to segregate the session variables to specific instances of the app.

Can you not create a function that is called on every page load to check for the existence of the required session vars, or request vars, and takes appropriate action (e.g. redirect to a form to create the required variables or a page that says "you were told!" :-)

Seems doubtful that IE can do something that Firefox can't - especially JavaScript.

they are working on one clients file, recieve a phone call from a different client and have to open that file but don't want to lose the work they haven't finished for the first client.

This is of course something that could be programmed, but it'll mean more work for you to facilitate. See it as a stack of document folders, opening one on top of the other.

Though not currently catered for in the project spec, or system design

If it was spec'd in IE in a single tab, I'd go with the unsupported warnings. Both for not-IE browsers and new tabs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.