4

I'm working on a PWA in conjunction with an enterprise application server.

The application server serves a responsive web view for a standalone browser, and customize the view on PWA with the help of PWA cookie which is set on PWA start url for the first time.

The problem is that the session between PWA and a standalone browser ( e.g Chrome on Android ) is being shared and once the user has installed the PWA, the consequent visits to the site with the standalone browser will show the PWA customized view.

Is there any way to separate sessions in PWA and standalone browser in device?I.e. to treat PWA as a private tab?

Or any other way?

Evgeny Minkevich
  • 2,319
  • 3
  • 28
  • 42
Misisol
  • 41
  • 1
  • 3
  • Do you work out an answer on this one as I need to do the same? – Brett Sutton Dec 11 '19 at 23:38
  • @BrettSutton Unfortunately not. We used to get the expected behaviour by using cookies and some javascript code with the help of "display-mode: standalone". – Misisol Dec 12 '19 at 16:34

1 Answers1

0

I am in a similar situation and believe the solution is to differentiate the names of your cookies and/or sessions. So for example - my logged in user has a SESSION['Key'] but for my App I'll have to create one SESSION['AppKey']. It will (as in my case) require a bit of reworking of your code but I don't believe there is any alternative.

It is worth noting though that IOS appears to separate Cookies from the browser and PWA so you may find testing your scenario with an IOS based device may work as you expect.

Antony
  • 3,875
  • 30
  • 32
  • The problem will appear the time the user logging in PWA app and also enter the Web version and it will cause problems when you want to know where exactly your are ( Specially in TWA ). – Misisol Jan 02 '20 at 13:12