---
title: port
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/httpcookiepropertykey/port
---

# port

An NSString object containing comma-separated integer values specifying the ports for the cookie.

## Declaration

```swift
static let port: HTTPCookiePropertyKey
```

## Discussion

Discussion Only valid for Version 1 cookies or later. The default value is an empty string (""). This cookie attribute is optional.

## See Also

### Cookie property keys

- [comment](foundation/httpcookiepropertykey/comment.md)
- [commentURL](foundation/httpcookiepropertykey/commenturl.md)
- [discard](foundation/httpcookiepropertykey/discard.md)
- [domain](foundation/httpcookiepropertykey/domain.md)
- [expires](foundation/httpcookiepropertykey/expires.md)
- [maximumAge](foundation/httpcookiepropertykey/maximumage.md)
- [name](foundation/httpcookiepropertykey/name.md)
- [originURL](foundation/httpcookiepropertykey/originurl.md)
- [path](foundation/httpcookiepropertykey/path.md)
- [sameSitePolicy](foundation/httpcookiepropertykey/samesitepolicy.md)
- [secure](foundation/httpcookiepropertykey/secure.md)
- [value](foundation/httpcookiepropertykey/value.md)
- [version](foundation/httpcookiepropertykey/version.md)
