I was just curious if we can get/view Session variables values for a website using Chrome DevTools.
If anyone knows, please share.
# View sessionStorage keys and valuesClick the Application tab to open the Application panel. Expand the Session Storage menu. Click a domain to view its key-value pairs. Click a row of the table to view the value in the viewer below the table.
Session IDs can be stored as cookies locally at the client end. When a request is made to the server, the server transmits the cookie containing the session ID. The server has stored the session ID and associated information from the last session and makes it available to the client if the session ID matches.
There is no way to manipulate the values stored in sessions from the client side. That's one of the main reasons you'd use a session over a cookie - YOU control the data. With cookies, the user can manipulate the data.
No, you cannot view session state variables at client side. Session state is stored at server, and Client browser only knows SessionID which is stored in cookie or URL.
ASP.NET Session State Overview
Sessions are identified by a unique identifier that can be read by using the SessionID property. When session state is enabled for an ASP.NET application, each request for a page in the application is examined for a SessionID value sent from the browser. If no SessionID value is supplied, ASP.NET starts a new session and the SessionID value for that session is sent to the browser with the response.
By default, SessionID values are stored in a cookie. However, you can also configure the application to store SessionID values in the URL for a "cookieless" session.
Chrome Browser has few extensions to view cookie. I use Edit This Cookie
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With