---
title: isSessionOnly
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/httpcookie/issessiononly
---

# isSessionOnly

A Boolean value that indicates whether the cookie should be discarded at the end of the session (regardless of expiration date).

## Declaration

```swift
var isSessionOnly: Bool { get }
```

## Discussion

Discussion This value is true if the cookie should be discarded at the end of the session (regardless of expiration date), otherwise false.

## See Also

### Determining cookie lifespan

- [expiresDate](foundation/httpcookie/expiresdate.md)
