The present invention relates to methods and apparatus for communicating data and, more particularly, to methods and systems for accelerating the performance of web browser caches.
Web browsers are used by people to download and display elements of content, often referred to as documents, from Web servers over private networks and the Internet. Today's browsers typically incorporate a cache that is used to automatically store downloaded documents during a user's browsing activity. When a document is requested by the browser user, this cache is first checked to determine if it contains the requested document, and if so, the document may be fetched from the cache instead of being retrieved from the server. In this way, the cache improves the responsiveness of document display, and reduces loads on the network and server.
One aspect of caching in general is determining the freshness of the data in the cache. In the particular case of caching web browser data, this determination is typically supported by including, along with a cached document, certain metadata or associated information, which governs the utilization of that document. In order to avoid utilizing a document from the cache which may be out of date with respect to a later version on the server from which it was originally downloaded, the browser may take steps to verify its freshness prior to use. This generally involves sending to the server a freshness verification request. If the server determines that the cached document is fresh (i.e., that it has not been modified on the server since it was cached at the browser), then the server responds with an indication of this condition. In this case the browser is free to utilize the cached document. Alternatively, if the server determines that the cached document is not fresh (i.e., that it has been modified on the sever since it was cached at the browser), then the server responds by sending a new version of the document to the browser. The browser utilizes this new version and updates its cache by replacing the prior cached version.
Web browsers utilize the Hypertext Transfer Protocol (HTTP) to retrieve documents from web servers over private networks and the Internet. HTTP provides a number of methods that govern transactions between clients and servers. The GET method is commonly used to retrieve documents from a server to a client browser.
The HTTP GET method is comprised of a request message, sent from a client, such as a web browser, to a server, along with a response message sent from the server back to the client. Some pertinent forms of these messages are described below.
This takes the form of an HTTP GET request where no condition is specified. The server is requested to return the document regardless of the time it was last modified.
Contains:
Example:
This takes the form of an HTTP 200 OK response where the server sends back document metadata, along with the document content.
Contains:
Example:
This takes the form of an HTTP GET request where an “If-Modified-Since” condition is specified. Using this condition, the server is requested to return one of two possible responses: (1) if the document (on the server) has been modified after the date specified in the request, then a new version of the document is returned; (2) if the document has not been modified, then an indication to this effect is returned.
The client browser utilizes this form of HTTP GET to verify freshness of a document in its cache, specifically by employing the “If-Modified-Since” condition along with the date of the last modified time for the document as it resides in the client's browser cache.
Contains:
Example:
In the case where the document on the server has been modified after the date specified in a freshness verification request, a new version of the document is returned in a manner identical to a document retrieval response described earlier.
In the case where document has not been modified, a “not modified” response is returned as described below.
Contains:
Example:
This takes the form of an HTTP GET request where a range condition is specified. Using the range condition, the server is requested to return little or no actual content of the document. Only the document metadata in the response is of interest to the requester.
Contains:
Example:
This takes the form of an HTTP 200 OK response where the server sends back document metadata, with little or no document content.
Contains:
Example:
Embodiments of the present invention concern a network device located between the browser and a server capable of inspecting the flow of client requests and server responses pertaining to document retrievals. In accord with the present invention, such a device may take steps to autonomously respond to client freshness verification requests on behalf of the server. This capability has the benefit of reducing load on the network and the server. Moreover, in the case where the intermediate device is co-located with the client (i.e., on the same LAN), and the network linkage between the intermediate device and the server includes a WAN, this capability has the added benefit of improving browser performance by eliminating request-response round-trips over the WAN. Because WAN latencies are generally long compared to LAN latencies, this capability may significantly improve browser performance.
Certain embodiments of the present invention provide a method for inspecting document freshness verification requests from a client and making “not modified” responses back to the client on behalf of a server, based on metadata derived from previous document retrieval request-response transactions. In one embodiment, the invention can be applied to HTTP GET request-response transactions between web browsers and web servers. By employing this invention within an acceleration device intermediate in a network path between client computers running a web browser, and servers responsive to such browsers, the benefits of reducing network and server load and improving browser performance can be achieved.
In one aspect, the present invention relates to a method for accelerating freshness verification requests. A document retrieval response is received from a server, and information is extracted from the document retrieval response. The extracted information is stored in a database. A freshness verification request is received from the client and extracted information stored in the database is consulted to determine if the freshness verification request can be serviced without forwarding the freshness verification request to a server.
The document retrieval response may include, for example, an HTTP 200 OK message. The freshness verification request may include, for example, an HTTP GET message with an If-Modified-Since condition. In one embodiment, the method further includes the transmission of a “not modified” response to the client, such as an HTTP 304 Not Modified message.
In another embodiment, the method includes receiving a document retrieval request from a client, forwarding the document retrieval request to a server, and forwarding the document retrieval response to a client. The document retrieval request may include, for example, an HTTP GET message without an If-Modified-Since condition.
In still another embodiment, the method includes transmitting a document information request to the server, receiving a document information response from the server, extracting information from the received document information response, and storing the extracted information in a database. The transmittal of a document information request may be made contemporaneously upon the receipt of the freshness verification request, subsequent to the receipt of the freshness verification request, or independent of the receipt of the freshness verification request. The document information request may include, for example, an HTTP GET message with a range condition. The document information response may include, for example, an HTTP 200 OK message with little or no document content.
In another aspect, the present invention relates to an apparatus for accelerating freshness verification requests. The apparatus includes a receiver, a database, and a processor. The receiver receives a document retrieval response from a server and a freshness verification request from a client. The processor extracts information from a received document retrieval response and stored the extracted information in the database, and consults the database to determine if a freshness verification request can be serviced without forwarding the freshness verification request to a server.
The document retrieval response may include, for example, an HTTP 200 OK message. The freshness verification request may include, for example, an HTTP GET message with an If-Modified-Since condition. In one embodiment, the apparatus also includes a transmitter for transmitting a “not modified” response to the client, such as an HTTP 304 Not Modified message.
In another embodiment, the receiver receives a document retrieval request from a client and the apparatus includes a transmitter for forwarding the document retrieval request to a server, and forwarding the document retrieval response to a client. The document retrieval request may include, for example, an HTTP GET message without an If-Modified-Since condition.
In still another embodiment, the transmitter transmits a document information request to the server, the receiver receives a document information response from the server, and the processor extracts information from the received document information response and stores the extracted information in the database. The transmitter may transmit the document information request contemporaneously upon the receipt of the freshness verification request, subsequent to the receipt of the freshness verification request, or independent of the receipt of the freshness verification request. The document information request may include, for example, an HTTP GET message with a range condition. The document information response may include, for example, an HTTP 200 OK message with little or no document content.
The foregoing and other objects, features, and advantages of the present invention, as well as the invention itself, will be more fully understood when read together with the accompanying drawings, in which:
In the drawings, like reference characters generally refer to corresponding parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed on the principles and concepts of the invention.
As mentioned above, one embodiment of the invention provides an acceleration device intermediate in the network path between client computers running web browsers and web servers. In this embodiment, the acceleration device processes HTTP GET requests and their related responses. Also in this embodiment, the acceleration device performs other processing steps pertaining to accelerating transmissions over the network, such as data reduction, caching, and protocol optimization.
It is important to note that all client requests, including freshness verification requests 128, must transit the WAN 112 from the client 104 to the server 116. Likewise, all server responses, including document retrieval responses 124 and “not modified” responses 132, must transit the WAN 112 from the server 116 back to the client 104. Therefore, even in cases where a document residing in a browser cache is up-to-date with respect to its originating server, the performance of a freshness verification request 128/“not modified” response 132 transaction may have a detrimental effect on browser performance. Eliminating unnecessary such transactions from the WAN has the benefit of improving performance and is the basis for the present invention.
Referring to
Again referring to
Still referring to
In this embodiment, the acceleration device 200 maintains the following information in the database 312:
As illustrated in
Upon receiving from a client a freshness verification request for a document specifying an “If-Modified-Since” time (Step 432), then if no table entry exists for that document (Step 436), the freshness verification request is forwarded to the appropriate server (Step 440). If a table entry exists and the current time is greater than the sum of the table entry's last checked time and the maximum table age (Step 444) or the current time is greater than the table entry's expiration time (Step 448) or the table entry's last modified time is greater than the “If-Modified-Since” time (Step 452), then the freshness verification request is also forwarded to the appropriate server (Step 440).
If none of those conditions are satisfied, then a “not modified” response is returned to the client (Step 456). If the current time is greater than the sum of the table entry's last checked time and the refresh age (Step 460), then a document information request is sent to the server for the document requested by the client (Step 464) and when the associated document information response from the server is received (Step 468) then a table entry for that document is updated with information derived from that response (Step 472), namely the last checked time is updated to reflect the current time, the expiration time for the document as derived from available information in the response (e.g., the time of expiry of the document and the max_age time), and the last modified time for the document as derived from the response.
Certain embodiments of the present invention were described above. It is, however, expressly noted that the present invention is not limited to those embodiments, but rather the intention is that additions and modifications to what was expressly described herein are also included within the scope of the invention. Moreover, it is to be understood that the features of the various embodiments described herein were not mutually exclusive and can exist in various combinations and permutations, even if such combinations or permutations were not made express herein, without departing from the spirit and scope of the invention. In fact, variations, modifications, and other implementations of what was described herein will occur to those of ordinary skill in the art without departing from the spirit and the scope of the invention. As such, the invention is not to be defined only by the preceding illustrative description but instead by the scope of the claims.
This application claims the benefit of U.S. Provisional Patent Application No. 60/919,269, filed on Mar. 21, 2007, which is hereby incorporated by reference as if set forth herein in its entirety.
Number | Date | Country | |
---|---|---|---|
60919269 | Mar 2007 | US |