понедельник, 17 июня 2013 г.

How to have two different sessions in browser for one user.

Have two different session in one browser - problematic and may be browser specific. In this case need to think how to distinguish two different tabs in browser, rather than have two different session. At this moment  i see only two valid options:

  1. generate urls with some unique id and track it as get/post parameters for each request/response. Can be easily  acheived with some web framework like Apache Wicket, where you can define/overwrite url generation strategy for whole application. 
  2. with jsf2 you can try to use view scope managed beans to track distinguish as bean property. 

1 комментарий:

  1. For a single page application you could also use $.ajaxSetup({ headers: { 'X-SessionId': 'server-or-client-side-generated-id' } });, which feels less invasive in this case.

    ОтветитьУдалить