S
S
symblight2017-03-14 09:48:27
Node.js
symblight, 2017-03-14 09:48:27

How to display data depending on the browser?

Hello, I have such a question, how to implement data output in the form of user history?
There is data in the database, let's say notes, the user added his notes in the browser, but if he goes to another browser, there will be other notes that he once added from this browser. It all depends on the session as I understand it. How to do it competently? Do the session id field in the database and output it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2017-03-14
@symblight

The session should contain a minimum of information, for example, only userID
The session is a short-lived entity, ideally it should die immediately or after a short period of time after closing the tab in the browser
All data should be tied not to the session but to the user
One user can have several simultaneous sessions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question