---
title: WebHistoryItem
framework: webkit
role: symbol
role_heading: Class
path: webkit/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.

## Declaration

```swift
class WebHistoryItem
```

## Topics

### Initializing WebHistoryItem objects

- [init(urlString:title:lastVisitedTimeInterval:)](webkit/webhistoryitem/init(urlstring:title:lastvisitedtimeinterval:)-5amr.md)

### Getting URL information

- [urlString](webkit/webhistoryitem/urlstring.md)
- [originalURLString](webkit/webhistoryitem/originalurlstring.md)

### Getting and setting page titles

- [title](webkit/webhistoryitem/title.md)
- [alternateTitle](webkit/webhistoryitem/alternatetitle.md)

### Getting other attributes

- [icon](webkit/webhistoryitem/icon.md)
- [lastVisitedTimeInterval](webkit/webhistoryitem/lastvisitedtimeinterval.md)

### Initializers

- [init(URLString:title:lastVisitedTimeInterval:)](webkit/webhistoryitem/init(urlstring:title:lastvisitedtimeinterval:)-d9r0.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Accessing Previous Webpages (Legacy)

- [WebBackForwardList](webkit/webbackforwardlist.md)
- [WebHistory](webkit/webhistory.md)
