| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.2 with Safari 1.0 and later. Available in Mac OS X v10.2.7 and later. |
| Companion guide | |
| Declared in | WebHistoryItem.h |
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.
Returns an alternate title that may be used in place of the receiver’s page title.
- (NSString *)alternateTitle
This method returns nil if no alternate title exists.
WebHistoryItem.hReturns the icon for the receiver’s page, or nil if none exists.
- (NSImage *)icon
WebHistoryItem.hInitializes 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.
- (id)initWithURLString:(NSString *)URLString title:(NSString *)title lastVisitedTimeInterval:(NSTimeInterval)time
WebKit normally creates WebHistoryItem objects for you but on occasion you might want to create an item and add it to the WebBackForwardList yourself. Note that when an instance is first initialized the strings returned by URLString and originalURLString are the same.
WebHistoryItem.hReturns the last time and date the receiver’s page was visited.
- (NSTimeInterval)lastVisitedTimeInterval
The interval is from a reference date as determined by NSDate.
WebHistoryItem.hReturns the string representation of the original URL for the receiver’s page.
- (NSString *)originalURLString
WebHistoryItem.hSets an alternate title for a page.
- (void)setAlternateTitle:(NSString *)alternateTitle
This is used as a convenience to display or store short versions of the page title.
WebHistoryItem.hReturns the receiver’s original page title.
- (NSString *)title
The title returned comes from the title HTML tag for HTML documents.
WebHistoryItem.hReturns the string representation of the URL for the receiver’s page.
- (NSString *)URLString
This URL may differ from the original URL if the page was, for example, redirected to a new location.
WebHistoryItem.hPosted by a WebHistoryItem object when the value of the history item’s title, alternate title, URL strings, or last visited interval changes.
This notification does not contain a userInfo dictionary.
WebHistoryItem.hLast updated: 2008-10-15