Blankman
Blankman

Reputation: 267320

If you don't set an expiration for a cookie, will it be lost when the browser is closed?

If you don't set an expiration for a cookie, will it be lost when the browser is closed?

Upvotes: 4

Views: 3094

Answers (2)

oglester
oglester

Reputation: 6655

If it has no expiration, then it will. It will be treated as a Session cookie. An exception to this are new versions Firefox, which can save your session.

Note, Chrome has a feature that keeps a process open, so closing the browser does not necessarily clear your session. Check your Task Bar for the Chrome icon.

Upvotes: 2

AaronS
AaronS

Reputation: 7713

You are correct. If you don't set an expiration for a cookie it will be stored only in memory and removed when the session ends. If you do set an expiration, it will be stored on the hard disk.

Upvotes: 0

Related Questions