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

时间秒杀一切 提交于 2019-12-06 16:43:28

问题


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

If anyone knows, please share.


回答1:


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.




回答2:


Session is maintained at server side. You can view cookies with session ids at client side. so chrome will help you to that only.

if you are using apache server then the file with same name as session can be found on server & all variables can be checked.




回答3:


If you're on ASP.NET you could potentially use Glimpse, a client-side "inspector" that overlays your webpage and shows you what's happening on the server-side. It's great, and the plugins library makes it even nicer to see other things like DB queries the page made and so on.

http://getglimpse.com/



来源:https://stackoverflow.com/questions/19956860/can-i-view-session-state-value-at-client-side-using-chrome-devtools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!