Preventing multiple browser sessions on the same server session

前端 未结 7 1805
时光取名叫无心
时光取名叫无心 2021-01-18 06:43

I\'m sure we\'ve all worked on, or are aware of web applications (especially in the enterprise) that have tightly bound themselves to the server session. In these cases, it

7条回答
  •  再見小時候
    2021-01-18 07:25

    If you really are in a bind and cannot fix the application to sanely handle multiple browser instances sharing the same session, then yes, this is a sound approach.

    For what it is worth, I have used the exact same concept to enforce concurrent usage license constraints - so it WILL detect multiple users sharing the same "key", which in your case is the session.

    I would modify your approach only slightly, and have the ping message contain the date/time of the client - so that you can avoid dealing with network latency at all in your calculations.

提交回复
热议问题