<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebHistoryItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebHistoryItem"
  },
  "title" : "WebHistoryItem"
}
-->

# WebHistoryItem

WebHistoryItem objects encapsulate information about visiting a page so that users can return to that page. WebHistory and WebBackForwardList objects manage lists of WebHistoryItem objects. WebHistoryItem objects are created and added to these lists automatically when loading pages, so you do not need to create WebHistoryItem objects directly.

```
class WebHistoryItem
```

## Topics

### Initializing WebHistoryItem objects

[`-  initWithURLString:title:lastVisitedTimeInterval:`](/documentation/WebKit/WebHistoryItem/init(urlString:title:lastVisitedTimeInterval:)-5amr)

Initializes the receiver with a URL,`URLString`, a title specified by `title` and the last time this item was visited specified by `time` title, and time last visited.

### Getting URL information

[`URLString`](/documentation/WebKit/WebHistoryItem/urlString)

The string representation of the URL for the receiver’s page.

[`originalURLString`](/documentation/WebKit/WebHistoryItem/originalURLString)

The string representation of the original URL for the receiver’s page.

### Getting and setting page titles

[`title`](/documentation/WebKit/WebHistoryItem/title)

The receiver’s original page title.

[`alternateTitle`](/documentation/WebKit/WebHistoryItem/alternateTitle)

An alternate title that may be used in place of the receiver’s page title.

### Getting other attributes

[`icon`](/documentation/WebKit/WebHistoryItem/icon)

The icon for the receiver’s page, or `nil` if none exists.

[`lastVisitedTimeInterval`](/documentation/WebKit/WebHistoryItem/lastVisitedTimeInterval)

The last time and date the receiver’s page was visited.

### Notifications

[`WebHistoryItemChangedNotification`](/documentation/WebKit/WebHistoryItemChangedNotification)

Posted by a WebHistoryItem object when the value of the history item’s title, alternate title, URL strings, or last visited interval changes.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)