Contents

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(_:) 47p2s method in Webframe to find out how to do this.

Declaration

class WebBackForwardList

Overview

Items are typically inserted in a back-forward list in the order they are visited. A WebBackForwardList object also maintains the notion of the current item (which is always at index 0), the preceding item (which is at index -1), and the following item (which is at index 1). The goBack() and goForward() methods move the current item backward or forward by one. The go(to:) method sets the current item to the specified item. All other methods that return WebHistoryItem objects do not change the value of the current item, they just return the requested item or items. You can also limit the number of history items stored in the back-forward list using capacity.

WebBackForwardList objects also control the number of pages cached. You can turn page caching off by setting the page cache size to 0 using the pageCacheSize() method, or limit the number of pages cached by passing a value greater than 0.

Topics

Adding and Removing Items

Moving Backward and Forward

Querying the Back-Forward List

Page Caching

Setting Attributes

See Also

Related Documentation

  • WebKit Objective-C Programming Guide

Accessing Previous Webpages (Legacy)