<!--
{
  "documentType" : "article",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/accessing-previous-webpages-legacy",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Accessing Previous Webpages (Legacy)"
}
-->

# Accessing Previous Webpages (Legacy)

## Topics

### Accessing Previous Webpages (Legacy)

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

A `WebBackForwardList` object maintains a list of visited pages used to go back and forward to the most recent page. A `WebBackForwardList` object maintains only the list data—it does not perform actual page loads (in other words, it does not make any client requests). If you need to perform a page load, see the [`load(_:)`](/documentation/WebKit/WebFrame/load(_:)-47p2s) method in [`WebFrame`](/documentation/WebKit/WebFrame) to find out how to do this.

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

`WebHistory` objects are used to maintain the pages visited by users. Visited pages are represented by [`WebHistoryItem`](/documentation/WebKit/WebHistoryItem) objects. You add and remove history items using the [`addItems(_:)`](/documentation/WebKit/WebHistory/addItems(_:)) and [`removeItems(_:)`](/documentation/WebKit/WebHistory/removeItems(_:)) methods. These methods post appropriate notifications when items are added or removed so you can update the display. `WebHistory` organizes the `WebHistoryItem` objects by the day they were visited, ordered from most recent to oldest. You can request all the days that contain history items using the [`orderedLastVisitedDays`](/documentation/WebKit/WebHistory/orderedLastVisitedDays) method or request the items visited on a particular day using the [`orderedItemsLastVisited(onDay:)`](/documentation/WebKit/WebHistory/orderedItemsLastVisited(onDay:)) method. `WebHistory` objects can be loaded and saved by specifying a file URL (see [`load(from:)`](/documentation/WebKit/WebHistory/load(from:))).

[`WebHistoryItem`](/documentation/WebKit/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.



---

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)