×

Dynamically loading scripts

  • US 7,689,665 B2
  • Filed: 04/27/2007
  • Issued: 03/30/2010
  • Est. Priority Date: 04/27/2007
  • Status: Active Grant
First Claim
Patent Images

1. At a computer system including a processor and system memory, the computer system connected to a network, the computer system including a Web browser configured to render Web pages at the computer system, the Web browser having a default script loading behavior that is used to load client-side scripts at the Web browser, the client-side scripts for generating content at the computer system that is to be included in Web pages rendered by the Web browser, a method for rendering a Web page at the Web browser, the method comprisingan act of receiving a Web page from a Web server, the Web page including static content, a reference to a client-side script loader script, and references to a plurality of other client-side scripts, the client-side script loader script configured to, upon execution, create a data structure for queuing the references to the plurality of other client-side scripts, the client-side script loader script also configured to, upon an indication from the Web browser, load the plurality of other client-side scripts in accordance with script loading rules, the script loading rules including loading rule logic configured to load the plurality of other client-side scripts based on identified characteristics of the plurality of other client-side scripts and based on identified relationships between any of the plurality of other client-side scripts so as to override the default script loading behavior of the Web browser;

  • an act of the processor executing the client-side script loader script to create a data structure at the computer system, the data structure for storing the references to the plurality of other client-side scripts;

    an act of the client-script loader script processing the Web page to enumerate the references to the plurality of other client-side scripts;

    an act of the processor storing the enumerated references in the data structure;

    an act of detecting that no further script references are included in the Web page subsequent to storing the enumerated references in the data structure;

    an act of the client-side script loader script referring to the enumerated references to create a script load order for the plurality of other client-side scripts to cause the plurality of other client-side scripts to load in parallel, the script load order based on the loading rule logic, the script load order differing from the order in which the references to the plurality of other client-side scripts were encountered during enumeration;

    an act of loading the plurality of other client-side scripts in parallel in accordance with the script load order to generate client-side content for inclusion in the Web page; and

    an act of using the static content and the generated client-side content in a rendering of the Web page.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×