简体   繁体   中英

How open same page on diffrent tab on browser with different value

I'm on develop a website using JSF, I got a problem on page that contain model Id, when I tried to open a same page twice on different tab browser, the value is same. How to set Id on every page to be able to show the right values? or maybe What the name of the method?. Thank You

Different browser tabs share allways a session. If you want to have local tab data, you need to identify separate browser tabs.

I did it this way:

  1. window.name is the only browser object with different memory per tab I found
  2. use window.name to hold the tab-id
  3. the browser is responsible for a generation of a uniq tab id if window.name is empty
  4. the generated tab-id is written in window.name
  5. the tab-id has to be in every url of the application
  6. a view scoped bean fetches (early) this tab-id and provides a per tab memory, hold by a session bean per tab-id
  7. use the tab memory instead of session memory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM