Methods and systems for javascript parsing
First Claim
1. A method of parsing a script within an HTML page to identify a URL for prefetching, the method comprising:
- receiving a script object;
parsing the script object with a token list in order to identify a token that indicates a possible URL in the script;
parsing before and after the token with a script parser;
identifying, by the parsing before and after the token, a plurality of URL strings and a script operator, wherein at least one of the URL strings comprises an expression associated with a variable;
constructing a complete URL using the plurality of URL strings and the script operator, wherein the script operator provides instructions for creating at least a portion of the complete URL using the plurality of strings, and wherein the complete URL does not include the script operator or the expression;
forwarding the complete URL to a detector, wherein the detector determines whether the complete URL is valid;
sending object retrieval requests to websites associated with the valid complete URL; and
prefetching data objects from webpages associated with the valid complete URL.
6 Assignments
0 Petitions
Accused Products
Abstract
The present invention relates to systems, apparatus, and methods of parsing a script within an HTML page. The method includes receiving a script object, where the script object includes text. The method further includes parsing the text of the script object for tokens and comparing the parsed tokens with a valid tokens list to determine locations within the text of the script object that include potential universal resource locators (URLs). The method includes parsing before and after the determined locations until complete URLs are constructed, and forwarding the complete URLs to a detector. The detector then determines whether the complete URLs are valid. The method then sends object retrieval requests to websites associated with the valid complete URLs.
84 Citations
18 Claims
-
1. A method of parsing a script within an HTML page to identify a URL for prefetching, the method comprising:
-
receiving a script object; parsing the script object with a token list in order to identify a token that indicates a possible URL in the script; parsing before and after the token with a script parser; identifying, by the parsing before and after the token, a plurality of URL strings and a script operator, wherein at least one of the URL strings comprises an expression associated with a variable; constructing a complete URL using the plurality of URL strings and the script operator, wherein the script operator provides instructions for creating at least a portion of the complete URL using the plurality of strings, and wherein the complete URL does not include the script operator or the expression; forwarding the complete URL to a detector, wherein the detector determines whether the complete URL is valid; sending object retrieval requests to websites associated with the valid complete URL; and prefetching data objects from webpages associated with the valid complete URL. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A system for accelerating network communications, the system comprising:
-
a client system including a proxy client configured to intercept a content request generated by the client, and to transmit the request; a proxy server coupled with the client system via the proxy client, the proxy server including a script parser configured to; receive a script object, wherein the script object includes syntax and the script object is embedded in the HTML text; parse the syntax of the script object to generate syntax tokens; compare the parsed syntax tokens with a valid token in order to determine locations within the syntax of the script object that include potential universal resource locator (URL); and parse before and after the determined locations with a script parser to identify a plurality of URL strings and a script function, wherein at least one of the URL strings comprises an expression associated with a variable, and construct a complete URL using the plurality of URL strings and the script function, wherein the script function provides direction for creating at least a portion of the complete URL using the plurality of strings, and wherein the complete URL does not include the script function or the expression, wherein the proxy server further includes a detector which is configured to receive the complete URL to determine whether the complete URL is valid; and a content server coupled with the proxy server, the content server configured to receive object retrieval requests associated with the valid complete URL from the proxy server, and transmit objects associated with the valid completed URL to the proxy server, wherein the proxy server is further configured to prefetch data objects from webpages associated with the valid complete URL. - View Dependent Claims (13, 14, 15, 16, 17)
-
-
18. A method for prefetching comprising:
-
storing, in a proxy server, a set of prefetch context information that associates a list of token identification contexts with a probability of prefetching success; receiving, at the proxy server, a script object; parsing, at the proxy server, the script object with a token list in order to identify a token that indicates a possible URL in the script object; parsing before and after the token with a script parser; identifying, by the parsing before and after the token, a plurality of URL strings and a script operator; constructing a complete URL using the plurality of URL strings and the script operator, wherein at least one of the URL strings comprises an expression associated with a variable, wherein the script operator provides instructions for creating at least a portion of the complete URL using the plurality of strings, and wherein the complete URL does not include the script operator or the expression; forwarding the complete URL to a detector, wherein the detector determines whether the complete URL is valid; notifying a prefetch abort within the proxy server of the token used to identify the complete valid URL; determining at the prefetch abort whether to prefetch the complete URL based on the set of prefetch context information; prefetching data objects from a webpage associated with the valid complete URL; and updating the set of prefetch context information based on a success of prefetching data objects from the webpage associated with the valid complete URL.
-
Specification