p0t4t0
410
4
Laravel

What is session state? And what is the importance of having a stateless backend?

Posted 1 year ago by p0t4t0

I've read somewhere that when defining routes in api.php, you ensure that your server doesn't make use of session state and thus remains stateless. Some time ago I have had trouble differentiating the two (api.php and web.php), on why anyone would still define routes in api.php when they could easily just do so in web.php. But just what is session state? And what is the importance of having a stateless back end? What are good use cases for this? Sample scenarios? Thank you.

Please sign in or create an account to participate in this conversation.