PDA

View Full Version : Starting multiple sessions question



Hans van de Laar
24-Feb-2017, 04:25 AM
How can I enforce starting a different session when starting a new browser session or browser instance once the web application has already started?
I noticed when you first start a web app like http://localhost/webordermobile_19/ it is directing you to a login page to provide credentials. However when logged into that session, creating another session (started by another browser instance or new tab page session) by using the same url bypasses the login and uses the same session key.
We don't find this desirable because:
- what happens with client properties e.g.
- we can't test the web app with different user credentials

Is there a way to always start with the default web page (login screen)?

Harm Wibier
24-Feb-2017, 10:23 AM
For the most part this is behavior we don't have control over. The framework is setting the session cookie as being a 'session' cookie by default and it is pretty much up to the browser to determine what it does with that.

If you want to test with a single browser and multiple logins you can use the incognito (or in private) function that most browsers have. Or test with different browsers.

What happens with Web Properties when opening a new browser / window tab that shares the session:
{ WebProperty=Client }: Each browser instance / tab will have its own set of values. They will not transfer to the other browser window. They are stored within the page scope and reloading the page clears them.
{ WebProperty=Server }: Each browser instance / tab will have its own set of values. They will not transfer to the other browser window. They are bound the client web properties and should behave the same.
{ WebProperty=ServerSession }: They will be shared across the tabs / window (if they share the session). They are bound to the session and will have the same lifetime.

There are ways to always start with a login screen but that means pretty much turning off the session system.

chuckatkinson
24-Feb-2017, 07:26 PM
Thanks Harm - best description I have seen so far...