RESTful API: how to store the state of an object?


One of the principles of RESTful is called "Statelessness" and in one article about it:

The first principle is state independence. Simply put, a RESTful server should not track, store, and even more so use the current contextual information about the client in its work. On the other hand, the client must take this task upon himself. In other words, don't force the server to remember the state of the mobile device using the API.

Now the question is: for example, the user in the game is located in location A. Then he will launch the game tomorrow in the browser. Naturally, it must be in location A. How to store this state – being in a location based on the Stateless principle?


State is not allowed to be stored on the client. But there is always data that requires not only client-side but also server-side validation.

Scroll to Top