0

I'm using Firefox and I'm trying to understand sessions and cookies.

In Firefox cookies are stored in a cookies.sqlite file.

Sessions are identified by a session name. The default session name is PHPSESSID, which is actually a cookie. When I inspect the Cookies inspector tab at the Network tab then I can see the PHPSESSID. Please see below.

enter image description here

I assumed that there should exists a PHPSESSID cookie in cookies.sqlite. So, I opened cookies.sqlite in the DB Browser for Sqlite program. I'm sure I opened the right coookies.sqlite because I went to about:support to check the profile folder.

My assumptions where not true, the PHPSESSID cookie doesn't exists in cookies.sqlite. Please have a look below (I censored the hostname).

enter image description here

My question is, why does PHPSESSID not exists in the cookies.sqlite?

Julian S
  • 361
  • 3
  • 13
  • https://askubuntu.com/questions/35312/firefox-hidden-cookies-not-in-cookies-sql relevant? – Federkun Dec 29 '17 at 14:23
  • @Federkun It's definitely an useful link. However, it doesn't answer my question because when I close / re-open Firefox the `PHPSESSID` is still not there. – Julian S Dec 29 '17 at 14:27
  • Interesting link: https://stackoverflow.com/questions/777767/firefox-session-cookies – Julian S Jan 04 '18 at 10:25

1 Answers1

1

PHPSESSID is a session cookie. It should not persist when you close your browser so it does not get written to disk.

It is possible to override this behaviour (note the caveats) however I wouldn't surprised if the browser used its page state storage substrate for the session cookie rather than the normal cookie file.

symcbean
  • 47,736
  • 6
  • 59
  • 94