Class

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

@interface WebHistoryItem : NSObject

Topics

Initializing WebHistoryItem objects

- initWithURLString:title:lastVisitedTimeInterval:

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

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

originalURLString

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

Getting and setting page titles

title

The receiver’s original page title.

alternateTitle

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

Getting other attributes

icon

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

lastVisitedTimeInterval

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

Notifications

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

Inherits From

Conforms To

See Also

Accessing Previous Webpages (Legacy)

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 loadRequest: method in WebFrame to find out how to do this.

Deprecated
WebHistory

WebHistory objects are used to maintain the pages visited by users. Visited pages are represented by WebHistoryItem objects. You add and remove history items using the addItems: and 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 method or request the items visited on a particular day using the orderedItemsLastVisitedOnDay: method. WebHistory objects can be loaded and saved by specifying a file URL (see loadFromURL:error:).

Deprecated