---
title: "load(from:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webhistory/load(from:)"
---

# load(from:)

Loads the contents of the specified web history file.

## Declaration

```swift
func load(from URL: URL!) throws
```

## Parameters

- `URL`: The URL of the file to load. The file should have been created previously by a web history object. Note that the file’s format is private and should not be edited directly.

## Discussion

Discussion When successful, this method posts a notification (WebHistoryLoadedNotification). note: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Related Documentation

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

### Loading and Saving History Information

- [save(to:)](webkit/webhistory/save(to:).md)
