Home > Enterprise >  Browser multiple tab session issue
Browser multiple tab session issue

Time:02-28

Im working on a ERP application, user are allow to switch between different branches to manage their inventory, different branch can access different data, when user trigger switchBranch() function we will store the branch_id in session so that the system will know the user are currently in which branch in order to return related data base on the branch_id in session, but that is a problem here if user trigger switchBranch() function in a new tab, it will cause old tab get error if user continue work on old tab because the session data already overwritten when they switchBranch() on new tab.

Any suggestion for these kind of scenario?

CodePudding user response:

Do not make branch_id globally, my suggesion is make branch_id component level, so as long as you need to pass branch_id to server you just need put it in request.

  • Related