Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I view Session State Value at client-side using Chrome DevTools?

I was just curious if we can get/view Session variables values for a website using Chrome DevTools.

If anyone knows, please share.

like image 241
dan1 Avatar asked Nov 13 '13 14:11

dan1


People also ask

How do I see session value in Chrome?

# 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.

Where are the session identifiers stored on client side?

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.

How do I change my browser session value?

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.


1 Answers

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.

enter image description here

like image 98
Win Avatar answered Sep 29 '22 18:09

Win