Better options to SESSION?

Asked

Viewed 95 times

1

I have always heard many people say that SESSION is not performative and that it was not advisable to use SESSION in applications . NET, but so far I haven’t found anything I can use in place of SESSION.

What I could use instead of SESSION?

  • To say that Session is not performative is like saying that a screwdriver is not performative. Every element of a technology has its specific uses, and if anyone thinks Session is a bad thing to use, it’s because someone used Session wrong.

1 answer

1

Everything always depends on it. Today with ASP, depending on the architecture, you can traffic information in other ways that do not use Session, as viewbag, viewdata... You need to know what you need to store and for how long.

Abusing Session can cause you problems like memory overflow, for example, which will cause the pool to stop, depending also on the server settings.. as for performance issues, it may not be very performative, since it uses the server resources and there everything is in competition, with other applications too, perhaps... but, this is information without ownership, on my part.

Particularly I use cookies to store lots of data, of course: encrypted and always with Httponly, so your server has access to this information and it is not available for capture by js, avoiding XSS.

You can read more about httpOnly cookies here: https://blog.codinghorror.com/protecting-your-cookies-httponly/

Or have other views here: Which is safer: Session or cookie?

(=

Browser other questions tagged

You are not signed in. Login or sign up in order to post.