Method and system for caching and adapting dynamic display pages for small display devices

A display system adapts a display page to a small display area using semantic information indicated by portions of the display page that are designated as cacheable. The display system adapts a display page by identifying leaf fragments, that is, fragments that contain no other fragments. The display system then determines whether each leaf fragment is a block that can be displayed as a unit in the display area or should be subdivided into blocks that each can be displayed as a unit in the display area. The display system then displays the display page on a block-by-block basis.

TECHNICAL FIELD

The described technology relates generally to displaying web pages on mobile devices with small display areas.

BACKGROUND

Mobile devices, such as handheld personal computers and personal digital assistants (“PDAs”), are becoming increasingly popular ways to access the Internet. Unfortunately, the experience of users in accessing web pages using these mobile devices has been less than satisfactory. First, because these mobile devices have small display areas, it is difficult to effectively display in such a small display area a web page that is designed for a large display area. Second, because these mobile devices typically have a relatively slow communications link (e.g., via a cell phone network), it can take an unacceptably long time to download an accessed web page. Third, because the mobile devices have limited computing power, the rendering of a complex web page can also take an unacceptably long time.

To allow for the effective display of web pages on a small display area, some techniques have been developed to dynamically adapt web pages that are too large for a small display area. One such adaptation technique is “page splitting,” which attempts to divide a web page into blocks that can fit as a unit into a small display area. One such page splitting technique analyzes the position and shape of HTML elements of a web page to identify blocks. However, it can be difficult to identify blocks from low-level HTML tags in a way that preserves page structure and does not lose information. Moreover, such adaptation techniques can be computationally expensive, especially on a mobile device.

Some techniques have been developed to speed up delivery of dynamic web pages by caching such web pages either at a client or at a server. A dynamic web page is a web page that is generated dynamically when the web page is accessed. The content of such web pages can be tailored to the user or contain up-to-date information (e.g., stock quotes). Such caching techniques, however, typically cache on a page-by-page basis. As a result, when even a small portion of a dynamic web page is changed, the entire web page needs to be retrieved from the web server. Various strategies have been proposed to make the caching of web pages more effective. One such strategy designates fragments within a web page that represent a cacheable portion. Each fragment can have its own expiration time. Thus, only those fragments that have expired need to be retrieved from the web server, and fragments that have not expired can be retrieved from the cache. Although adaptation can be performed on a web page whose fragments have been refreshed, such adaptation is still time-consuming, especially for a mobile device.

It would be desirable to combine adaptation techniques with fragment-based caching techniques to improve the overall performance of accessing web pages via a mobile device. In particular, it would be desirable to avoid having to adapt an entire web page each time a fragment is refreshed and to take advantage of semantic information indicated by fragments when adapting a web page.

SUMMARY

A display system adapts a display page to a small display area using semantic information indicated by portions of the display page that are designated as cacheable. A display page may have various portions that are designated as cacheable fragments as part of the definition of the display page. The display system adapts a display page by identifying leaf fragments, that is, fragments that contain no other fragments. The display system then determines whether each leaf fragment is a block that can be displayed as a unit in the display area or should be subdivided into blocks that each can be displayed as a unit in the display area. The display system then displays the display page on a block-by-block basis.

DETAILED DESCRIPTION

A method and system for displaying display pages on a small display device is provided. In one embodiment, the display system adapts a display page to a small display area using semantic information indicated by portions of the display page that are designated as cacheable. A display page may have various portions that are designated as cacheable fragments. The display system adapts a display page by identifying leaf fragments, that is, fragments that contain no other fragments. The display system then determines whether each leaf fragment is a block that can be displayed as a unit in the display area or should be subdivided into blocks that each can be displayed as a unit in the display area. The display system may also cache the fragments so that only fragments that have expired need to be refreshed when the display page is redisplayed. In addition, the display system may cache adaptation information that indicates whether a leaf fragment is a block or is subdivided into blocks. When portions of the leaf fragment are to be displayed, the display system can use the cached adaptation information without having to re-adapt the fragment. In this way, devices with small display areas can avoid having to re-adapt an entire display page when a fragment is refreshed and can use the semantic information indicated by the designation of a portion as a fragment when adapting a display page.

In one embodiment, the display system represents a display page as a hierarchy of nodes. For example, if the display page is an HTML document, then the hierarchy may be represented by the document object model (“DOM”). These nodes are referred to as “document nodes” since they are explicitly defined in the display page document. Some of the document nodes may be designated as “fragment nodes” that can be cached. A fragment node includes an expiration time, also referred to as a time-to-live indicator, that indicates when the fragment expires and needs to be refreshed. The fragment nodes can be hierarchically organized in that a fragment node may contain a child fragment node or a child non-fragment node.

Upon receiving a display page, the display system adapts the display page by first identifying as “segment nodes” those document nodes that have no child document nodes, that is, leaf document nodes. The display system then identifies whether a segment node is a block node that can be displayed as a unit or can be subdivided into non-document, block nodes. The display system then caches the content of the nodes, the identification of the segment nodes, and the designation of block nodes. Upon receiving a request to display content of a node, the display system determines whether the cached content of that node has expired. (A non-fragment node may be considered to expire immediately and thus cannot be cached.) When the cached content of the node has expired, the display system retrieves from a display page server the content of the fragment node that has expired. The display system then identifies the segment nodes of the retrieved fragment node, designates block nodes, and caches the received content and adaptation information. The display system then displays the node based on the cached content and adaptation information.

FIG. 2illustrates the hierarchical organization of the nodes of the display page ofFIG. 1. Fragment node f0, the root node of the hierarchy, contains fragment nodes f1and f2and non-fragment node c1as child nodes. Fragment node f2contains fragment node f3and non-fragment node c2as child nodes. Fragment node f1has been divided into block nodes b1, b2, b3, and b4. The parenthetical within each node identifies the node type: “D” indicates a document node, “F” indicates a fragment node, “S” indicates a segment node, and “B” indicates a block node. For example, fragment node f3is a document node, a fragment node, a segment node, and a block node; and non-fragment node c1is a document node, a segment node, and a block node.

FIG. 3is a block diagram illustrating components of the display system in one embodiment. The display system300is connected to web server310via communications link320. The display system may execute on a device with a small display area, such as a PDA. The display system includes a user interface component301, a display node component302, an update node component303, an identify segments component304, a cache fragment component305, and a split segment component306. The display system also includes cache307for storing the cached information. The user interface component may input user commands and invoke the display node component to display a node selected by the user. The display system may provide a hierarchical browse capability that allows a user to browse through the node hierarchy of a web page. For example, when a display page is first accessed, the root node is selected. The user interface component invokes the display node component to display the selected node. If the root node contains child nodes, then the display node component would display a list of the child nodes. A user can select a child node to browse the hierarchy of nodes. The user interface component invokes the display node component passing the selected node. When a leaf node is passed, the display node component displays the content of the leaf node. Before displaying a node, the display node component updates the content of a selected node by invoking the update node component. The update node component refreshes the cache for that node as appropriate. When new content is retrieved for a node, the update node component identifies segment nodes by invoking the identify segments component, and caches the content within the node by invoking the cache fragment component. The cache fragment component may invoke the split segment component to subdivide a segment node into block nodes. The display node component retrieves node content from the cache and then displays it on a display device308. The web server includes a web engine311that generates dynamic web pages and portions of dynamic web pages upon receiving a request from the display system.

The computing device on which the display system is implemented may include a central processing unit, memory, input devices (e.g., keyboard and pointing devices), output devices (e.g., display devices), and storage devices (e.g., disk drives). The memory and storage devices are computer-readable media that may contain instructions that implement the display system. In addition, the data structures and message structures may be stored or transmitted via a data transmission medium, such as a signal on a communications link. Various communications links may be used, such as the Internet, a local area network, a wide area network, or a point-to-point dial-up connection.

The display system may be implemented in various operating environments that include personal computers, PDAs, cell phones, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.

FIG. 4is a flow diagram that illustrates the processing of the display node component in one embodiment. The component is passed a node and controls the displaying of that node on the display device. In block401, the component invokes the update node component to update the cache for the passed node as appropriate. In decision block402, if the passed node has child nodes, then the component continues at block403, else the passed node is a block node and the component continues at block404. In block403, the component displays the child nodes and then completes. For example, when fragment node f0is selected by user, the component displays a list of the child nodes that includes fragment nodes f1and f2and non-fragment node c1. In block404, the component displays the content of the passed node and then completes. A node that has no child nodes is a block node. For example, if block node b1is passed, then its content is retrieved from the cache and displayed. If fragment node f3is passed, then its content is retrieved from the cache and displayed.

FIG. 5is a flow diagram that illustrates the processing of the update node component in one embodiment. The component is passed a node and refreshes the cache as appropriate. In block501, the component checks whether the passed node has expired. In decision block502, if the passed node has expired, then the component continues at block503, else the component returns. In block503, the component requests the content for the passed fragment node from the display page server. In block504, when the content is retrieved, the component invokes the identify segments component to identify the segment nodes within the retrieved fragment node. In block505, the component invokes the cache fragment component to cache the content of the retrieved fragment node along with the adaptation information. The component then returns.

FIG. 6is a flow diagram that illustrates the processing of the identify segments component in one embodiment. The component is passed a document node and identifies segment nodes within that document node. In blocks601-609, the component loops selecting each child node of the passed node and identifying whether it is a segment node and, if not, recursively invoking the identify segments component to identify segments within the selected child node. If the passed document node has no child nodes, then it is designated a segment node and the component returns immediately (not shown inFIG. 6). In block601, the component selects the next child node of the passed node. In decision block602, if all the child nodes have already been selected, then the component returns, else the component continues at block603. In decision block603, if the selected child node contains fragment nodes, then the component continues at block604, else the child node is a segment node and the component continues at block605. In block604, the component recursively invokes the identify segments component to identify segment nodes within the selected child node. The component then loops to block601to select the next child node. In block605, the selected child node is a segment node, and the component saves the content of the segment node. In block606, the component sets an indicator of the parent fragment node of the selected child node. The root document node has no parent fragment node. In decision block607, if the selected child node is a fragment node, then the component continues at block608to set a fragment indicator and then continues at block609, else the component continues at block609. In block609, the component adds the selected child node to the list of segment nodes and then loops to block601to select the next child node.

FIG. 7is a flow diagram that illustrates the processing of the cache fragment component in one embodiment. The component loops caching the content of the identified segment nodes that are fragment nodes. In block701, the component selects the next segment node. In decision block702, if all the segment nodes have already been selected, then the component returns, else the component continues at block703. In decision block703, if the selected segment node is already cached, then the component loops to block701to select the next segment node, else the component continues at block704. In block704, the component invokes the split segment component to designate the selected segment as a block or to subdivide it into blocks. In decision block705, if the selected segment node is a fragment node, then the component continues at block707, else the component continues at block706. In block706, the component caches the split results with the nearest ancestor fragment node and then loops to block701to select the next segment node. The component caches the split result in one embodiment by inserting special tags into the display page document to delimit the blocks. In block707, the component caches the split results with the selected segment node. In decision block708, if the parent fragment node is null (indicating a root node), then the component loops to block701to select the next segment node, else the component continues at block709. In block709, the component inserts tags into the parent fragment node to indicate the split result. The component then loops to block701to select the next segment node.

FIG. 8is a flow diagram that illustrates the processing of the split segment component in one embodiment. The component is passed a segment node. If the passed segment has no child nodes, then the component designates it as a block node that cannot be subdivided, else the component subdivides the segment node into block nodes. In block801, the component selects a next child node of the passed node. If the passed node has no child nodes, then the component designates it as a block node and returns (not shown inFIG. 8). In decision block802, if all the child nodes have already been selected, then the component returns, else the component continues at block803. In block803, if the selected child node fits onto a display device or cannot be subdivided, then the component continues at block804, else the component continues at block805. In block804, the component designates the selected child node as a block node and then loops to block801to select the next child node. In block805, the component recursively invokes the split segment component passing the selected child node and then loops to block801to select the next child node.

One skilled in the art will appreciate that although specific embodiments of the display system have been described herein for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the invention. Accordingly, the invention is not limited except by the appended claims.