<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLSessionConfiguration/default",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURLSessionConfiguration(cpy)defaultSessionConfiguration"
  },
  "title" : "default"
}
-->

# default

A default session configuration object.

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

## 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`](/documentation/Foundation/NSURLConnection) and [`NSURLDownload`](/documentation/Foundation/NSURLDownload) classes.

> Note:
> If you’re porting code based on the ``doc://com.apple.foundation/documentation/Foundation/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

[Fetching website data into memory](/documentation/Foundation/fetching-website-data-into-memory)

Receive data directly into memory by creating a data task from a URL session.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)