How do you view session cookies in Internet Explor

2019-01-15 00:26发布

I am able to see session cookies in Firefox 3.6 by going to

Tools->Options->Privacy->Remove Individual Cookies

How do I see those same session cookies in IE (6/7/8)?

Tools->Internet Options->Browsing history Settings->View files

only contains persistent cookies

Also how do I access them programmatically? In Firefox I use the nsICookieManager interface to read the session cookies, does IE contain an equivalent interface?

3条回答
Emotional °昔
2楼-- · 2019-01-15 00:43

F12-> Network Tab -> Enable Network Capture Traffic Capturing - > Details Tab -> Request Header Tab.

Snap Shot

查看更多
Anthone
3楼-- · 2019-01-15 00:44

Type into adress-bar:

javascript:alert(document.cookie)

to see the cookies that are currently readable by javascript.

Regarding to the read/write of session-cookies:
Why do you need to do it using javascript? usually session-cookies are needed to have an relation to serverside stored data, so you need to manage the cookies from serverside, no matter what browser there may be.

查看更多
贼婆χ
4楼-- · 2019-01-15 00:48

Cookies set with the HTTPOnly attribute will not be visible to Javascript (e.g. via the document.cookie accessor). In IE8, 9, and 10, hit F12 to open the Developer Tools. Click Cache > View Cookie Information to see persistent and session cookies that apply to the current domain.

This feature is not present in the IE11 version of the tools, which would mean that your choices are 1> Watch outbound Cookie headers in Fiddler or on the Network tab, or 2> Write a plugin that calls the InternetGetCookieEx API with the appropriate flag to include HTTPOnly cookies.

查看更多
登录 后发表回答