---
title: default
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/urlsessionconfiguration/default
---

# default

A default session configuration object.

## Declaration

```swift
class var `default`: URLSessionConfiguration { get }
```

## Discussion

Discussion The default session configuration uses a persistent disk-based cache (except when the result is downloaded to a file) and stores credentials in the user’s keychain. It also stores cookies (by default) in the same shared cookie store as the NSURLConnection and NSURLDownload classes. note: If you’re porting code based on the NSURLConnection class, use this method to obtain an initial configuration object and then customize that object as needed. Modifying the returned session configuration object does not affect any configuration objects returned by future calls to this method, and does not change the default behavior for existing sessions. It is therefore always safe to use the returned object as a starting point for additional customization.

## See Also

### Related Documentation

- [Fetching website data into memory](foundation/fetching-website-data-into-memory.md)

### Creating a session configuration object

- [ephemeral](foundation/urlsessionconfiguration/ephemeral.md)
- [background(withIdentifier:)](foundation/urlsessionconfiguration/background(withidentifier:).md)
- [init()](foundation/urlsessionconfiguration/init().md)
- [new()](foundation/urlsessionconfiguration/new().md)
