Delayed code parsing for reduced startup latency
First Claim
Patent Images
1. A system comprising:
- one or more computers; and
a computer-readable medium coupled to the one or more computers having instructions stored thereon which, when executed by the one or more computers, cause the one or more computers to perform operations comprising;
receiving, and storing in a browser cache, a resource that includes markup language code and executable code embedded within the markup language code, wherein the executable code is embedded within a comment of the markup language code such that the executable code is not executed when the markup language code is initially parsed, and an end-comment delimiter of the executable code being replaced with a predefined token,parsing the markup language code, and delaying parsing the executable code,after the markup language code has been parsed, retrieving the resource from the browser cache, without transmitting a request for the resource over a network, then extracting the executable code from the comment, andexecuting the executable code,wherein extracting the executable code from the comment comprises selecting a portion of the comment between a begin-comment delimiter and an end-comment delimiter of the markup language code, and replacing, within the portion of the comment, one or more occurrences of the predefined token with the end-comment delimiter of the executable code.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for delaying code parsing. In one aspect, a method includes receiving a resource that includes markup language code and executable code embedded within the markup language code, invoking the markup language code without parsing the executable code, extracting the executable code from within the markup language code, and invoking the executable code.
-
Citations
17 Claims
-
1. A system comprising:
-
one or more computers; and a computer-readable medium coupled to the one or more computers having instructions stored thereon which, when executed by the one or more computers, cause the one or more computers to perform operations comprising; receiving, and storing in a browser cache, a resource that includes markup language code and executable code embedded within the markup language code, wherein the executable code is embedded within a comment of the markup language code such that the executable code is not executed when the markup language code is initially parsed, and an end-comment delimiter of the executable code being replaced with a predefined token, parsing the markup language code, and delaying parsing the executable code, after the markup language code has been parsed, retrieving the resource from the browser cache, without transmitting a request for the resource over a network, then extracting the executable code from the comment, and executing the executable code, wherein extracting the executable code from the comment comprises selecting a portion of the comment between a begin-comment delimiter and an end-comment delimiter of the markup language code, and replacing, within the portion of the comment, one or more occurrences of the predefined token with the end-comment delimiter of the executable code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A non-transitory computer storage medium encoded with a computer program, the program comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:
-
receiving, and storing in a browser cache, a resource that includes markup language code and executable code embedded within the markup language code, wherein the executable code is embedded within a comment of the markup language code such that the executable code is not executed when the markup language code is initially parsed, and an end-comment delimiter of the executable code being replaced with a predefined token, parsing the markup language code, and delaying parsing the executable code, after the markup language code has been parsed, retrieving the resource from the browser cache, without transmitting a request for the resource over a network, then extracting the executable code from the comment, and executing the executable code, wherein extracting the executable code from the comment comprises selecting a portion of the comment between a begin-comment delimiter and an end-comment delimiter of the markup language code, and replacing, within the portion of the comment, one or more occurrences of the predefined token with the end-comment delimiter of the executable code.
-
-
10. A computer-implemented method comprising:
-
receiving, and storing in a browser cache, a resource that includes markup language code and executable code embedded within the markup language code, wherein the executable code is embedded within a comment of the markup language code such that the executable code is not executed when the markup language code is initially parsed, and an end-comment delimiter of the executable code being replaced with a predefined token, parsing the markup language code, and delaying parsing the executable code, after the markup language code has been parsed, retrieving the resource from the browser cache, without transmitting a request for the resource over a network, then extracting the executable code from the comment, and executing the executable code, wherein extracting the executable code from the comment comprises selecting a portion of the comment between a begin-comment delimiter and an end-comment delimiter of the markup language code, and replacing, within the portion of the comment, one or more occurrences of the predefined token with the end-comment delimiter of the executable code. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
Specification