Transparently intercepting and optimizing resource requests
First Claim
1. A method, comprising:
- sending a request to a server, wherein the request is sent by software code executing on a computer, wherein the software code includes a browser and a set of functions for obtaining and presenting information, and wherein the set of functions can be invoked by scripts that are retrieved by the browser;
in response to the request, receiving a first script and at least a second script from the server, wherein the first script includes instructions for adding a proxy software layer to intercept invocations to the set of functions, wherein the second script includes at least one invocation to at least one function in the set of functions, and wherein the first script and at least the second script are received by the browser;
executing the first script on the computer, thereby adding the proxy software layer to intercept subsequent invocations to each function in the set of functions;
executing the second script on the computer;
when the executing second script invokes a function in the set of functions,the proxy software layer intercepting said invocation of the function, andthe proxy software layer invoking a resource optimization handler corresponding to the function instead of invoking the function, wherein the second script invoked the function to retrieve a resource from a remote location;
wherein in response to determining that an optimized version of the resource is available, the invoked resource optimization handler retrieves the optimized version of the resource, generates a non-optimized version of the resource from the optimized version of the resource, and returns the non-optimized version of the resource to the script; and
wherein the invoked resource optimization handler determines that the optimized version of the resource is available by performing a lookup on a table using an identifier associated with the resource, wherein the table maps identifiers associated with resources to identifiers associated with optimized resources, wherein the invoked resource optimization handler determines that the optimized version of the resource is available if the lookup succeeds, and wherein the invoked resource optimization handler determines that the optimized version of the resource is not available if the lookup fails.
9 Assignments
0 Petitions
Accused Products
Abstract
Systems and techniques for transparently intercepting and optimizing resource requests are described. Some embodiments can send a request to a server. In response to the request, the embodiments can receive a first script and at least a second script from the server, wherein the first script includes instructions for intercepting invocations to a set of functions, and wherein the second script includes at least one invocation to at least one function in the set of functions. The first script can then be executed, thereby causing subsequent invocations to each function in the set of functions to be intercepted by a corresponding resource optimization handler. Next, the second script can be executed. When the executing second script invokes a function in the set of functions, the invocation of the function can be intercepted, and a resource optimization handler corresponding to the function can be invoked instead of invoking the function.
-
Citations
13 Claims
-
1. A method, comprising:
-
sending a request to a server, wherein the request is sent by software code executing on a computer, wherein the software code includes a browser and a set of functions for obtaining and presenting information, and wherein the set of functions can be invoked by scripts that are retrieved by the browser; in response to the request, receiving a first script and at least a second script from the server, wherein the first script includes instructions for adding a proxy software layer to intercept invocations to the set of functions, wherein the second script includes at least one invocation to at least one function in the set of functions, and wherein the first script and at least the second script are received by the browser; executing the first script on the computer, thereby adding the proxy software layer to intercept subsequent invocations to each function in the set of functions; executing the second script on the computer; when the executing second script invokes a function in the set of functions, the proxy software layer intercepting said invocation of the function, and the proxy software layer invoking a resource optimization handler corresponding to the function instead of invoking the function, wherein the second script invoked the function to retrieve a resource from a remote location; wherein in response to determining that an optimized version of the resource is available, the invoked resource optimization handler retrieves the optimized version of the resource, generates a non-optimized version of the resource from the optimized version of the resource, and returns the non-optimized version of the resource to the script; and wherein the invoked resource optimization handler determines that the optimized version of the resource is available by performing a lookup on a table using an identifier associated with the resource, wherein the table maps identifiers associated with resources to identifiers associated with optimized resources, wherein the invoked resource optimization handler determines that the optimized version of the resource is available if the lookup succeeds, and wherein the invoked resource optimization handler determines that the optimized version of the resource is not available if the lookup fails. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A non-transitory computer-readable storage medium storing software code that, when executed by a computer, causes the computer to perform a method, the method comprising:
-
sending a request to a server, wherein the software code includes a browser and a set of functions for obtaining and presenting information, and wherein the set of functions can be invoked by scripts that are retrieved by the browser; in response to the request, receiving a first script and at least a second script from the server, wherein the first script includes instructions for adding a proxy software layer to intercept invocations to the set of functions, wherein the second script includes at least one invocation to at least one function in the set of functions, and wherein the first script and at least the second script are received by the browser; executing the first script on the computer, thereby adding the proxy software layer to intercept subsequent invocations to each function in the set of functions; executing the second script; and when the executing second script invokes a function in the set of functions, the proxy software layer intercepting said invocation of the function, and the proxy software layer invoking a resource optimization handler corresponding to the function instead of invoking the function, wherein the second script invoked the function to retrieve a resource from a remote location; wherein in response to determining that an optimized version of the resource is available, the invoked resource optimization handler retrieves the optimized version of the resource, generates a non-optimized version of the resource from the optimized version of the resource, and returns the non-optimized version of the resource to the script; and wherein the invoked resource optimization handler determines that the optimized version of the resource is available by performing a lookup on a table using an identifier associated with the resource, wherein the table maps identifiers associated with resources to identifiers associated with optimized resources, wherein the invoked resource optimization handler determines that the optimized version of the resource is available if the lookup succeeds, and wherein the invoked resource optimization handler determines that the optimized version of the resource is not available if the lookup fails, wherein each identifier associated with a resource or an optimized resource is a Uniform Resource Locator (URL). - View Dependent Claims (11)
-
-
12. An apparatus, comprising:
-
a processor; and a non-transitory computer-readable storage medium storing software code that, when executed by the processor, causes the apparatus to perform a method, the method comprising; sending a request to a server, wherein the software code includes a browser and a set of functions for obtaining and presenting information, and wherein the set of functions can be invoked by scripts that are retrieved by the browser; in response to the request, receiving a first script and at least a second script from the server, wherein the first script includes instructions for adding a proxy software layer on the apparatus to intercept invocations to the set of functions, and wherein the second script includes at least one invocation to at least one function in the set of functions, and wherein the first script and at least the second script are received by the browser; executing the first script, thereby adding the proxy software layer to intercept subsequent invocations to each function in the set of functions; executing the second script; and when the executing second script invokes a function in the set of functions, the proxy software layer intercepting said invocation of the function, and the proxy software layer invoking a resource optimization handler corresponding to the function instead of invoking the function, wherein the second script invoked the function to retrieve a resource from a remote location; wherein in response to determining that an optimized version of the resource is available, the invoked resource optimization handler retrieves the optimized version of the resource, generates a non-optimized version of the resource from the optimized version of the resource, and returns the non-optimized version of the resource to the script; and wherein the invoked resource optimization handler determines that the optimized version of the resource is available by performing a lookup on a table using an identifier associated with the resource, wherein the table maps identifiers associated with resources to identifiers associated with optimized resources, wherein the invoked resource optimization handler determines that the optimized version of the resource is available if the lookup succeeds, and wherein the invoked resource optimization handler determines that the optimized version of the resource is not available if the lookup fails. - View Dependent Claims (13)
-
Specification