---
title: optionalShared()
framework: webkit
role: symbol
role_heading: Type Method
path: webkit/webhistory/optionalshared()
---

# optionalShared()

Returns a shared web history object, if one exists.

## Declaration

```swift
class func optionalShared() -> WebHistory!
```

## Return Value

Return Value A shared web history object initialized with the default web history file, or nil if one was not previously specified using the setOptionalShared(_:) method.

## See Also

### Related Documentation

- [load(from:)](webkit/webhistory/load(from:).md)
- [WebKit Objective-C Programming Guide](apple-archive/documentation/Cocoa/Conceptual/DisplayWebContent.md)

### Accessing Shared History Objects

- [setOptionalShared(_:)](webkit/webhistory/setoptionalshared(_:).md)
