In a distributed computing system containing multiple entities such as a client component (“client”) and a server component (“server”), typically the server provides the client the layout of a Web page, and the client runs a script to produce the initial content for the Web page. The content of the Web page can be dynamic: often, after the initial content of the Web page is rendered by the client-side script, the content of the Web page may be subsequently re-rendered by the client-side script in response to user actions and input from other entities in the distributed computing system.
As shown in
Such a client-side content rendering mechanism presents some problems. For example, search engines usually do not run scripts. Therefore, when a search engine queries the client 102 for the Web page, the search engine obtains what is offered by HTML A (106), i.e., the layout information and static content of the Web page. The search engine cannot obtain the actual content of the Web page that is important for indexing purposes. In addition, a Web browser on the client 102 may not have the ability to run scripts or the Web browser's ability to run scripts is disabled. As a result, the Web browser on the client 102 cannot run the script 108 to generate HTML B (114) and hence the initial content for the Web page.
While specific disadvantages of existing systems have been illustrated and described in this Background Section, those skilled in the art and others will recognize that the subject matter claimed herein is not limited to any specific implementation for solving any or all of the described disadvantages.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
Aspects of the invention solve the above-identified problems by simulating and executing on the server a client-side script that renders initial content of a Web page. The simulation creates on the server a client-side execution environment for the script generating the initial content of the Web page. As a result, the initial rendering of the Web page sent to a client by a server already contains the initial content that is usually generated on the client.
One aspect of the invention includes a distributed computing system containing at least one server and at least one client. The server provides one or more Web pages for the client to display. The server uses a document object model (DOM) simulator to model a file containing the source code of a Web page. Such a file can be an HTML file, for example. The server may further include a script engine (“server-side script engine”) that simulates or that is the same as the script engine used by the client.
The server uses the DOM simulator to provide a DOM of the layout and static content of a Web page and of scripts for the Web page. The server then extracts from the DOM the script that is responsible for rendering the initial content of the Web page. Such a script may be generated by sequentially ordering contents extracted from the DOM that exist in script tags and scripting source code in the DOM. The server then uses the server-side script engine to execute the extracted script on the DOM. As a result of executing the script, the DOM now contains the initial content of the Web page. The server then extracts the initial content of the Web page from the DOM. Finally, the server sends the initial content of the Web page to the client for display.
In summary, aspects of the invention enable a server in a distributed computing system to provide initial content of a Web page, wherein the initial content is usually rendered by a client-side script. Therefore, a client can display the initial content of the Web page even if the Web browser of the client cannot run the client-side script to generate the initial content. As a result, search engines that generally do not run scripts still can obtain the initial content of a Web page for indexing purpose.
The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same become better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:
The following text illustrates and describes exemplary embodiments of the invention. However, those of ordinary skill in the art will appreciate that various changes can be made therein without departing from the spirit and scope of the invention.
Embodiments of the invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer including at least a processor and a memory. Generally described, program modules include routines, programs, widgets, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. Embodiments of the invention may also be practiced in a distributed computing system including multiple entities. Each of the entities has the potential of functioning as a server providing a service as well as a client receiving the service provided by a server. The service can be, for example, providing a Web page. The entities may be local to a same computer system or are linked remotely through a communications network. In the distributed computing system, program modules may be located on local and/or remote computer storage media.
Exemplary embodiments of the invention utilize existing server-side technology to simulate on a server a client-side execution environment for a client-side script generating the initial content of a Web page. For example, a document object model (“DOM”) simulator is needed to generate a DOM modeling a file containing the source code of a Web page. Such a file may be an HTML file, for example. The DOM simulates the object model of the HTML. The DOM can also be an extensible markup language (“XML”) DOM, a technology that is available on almost any server platform. In addition, a server-side script engine is needed that simulates or functions the same as the client-side script engine. For example, if the client uses JavaScript as its script engine, the server needs to provide a script engine that is capable of executing JavaScript files. The server-side script engine may be a simulation of the client-side script engine or the client-side script engine itself. Once a DOM and a proper server-side script engine are available, the server-side script engine executes the client-side script such as the script 108 illustrated in
Besides simulating layout information and static content of a Web page, the DOM 204 also simulates scripts 205 for the Web page, including the script 108 for generating initial content of the Web page. The server 104 then extracts the script 108 from the DOM 204. See block 206. The script 108 is also called the client script because the script 108 was designed to run by the client 102. In exemplary embodiments of the invention, the server 104 constructs the script 108 by scanning the DOM 204 for <script> tags and by fetching or resolving <script src= . . . > scripts. The script 108 is built using the sequential order of the content in the <script> tags and the scripts designated in <script src= . . . >.
The server 104 then executes the script 108 on the DOM 204. See block 208. In an exemplary embodiment of the invention, the script 108 is executed in an enriched execution environment where the DOM 204 is available to the script 108 as built-in objects, accessible through the same paths as if the script 108 were on the client 102. As a result, the DOM 204 appears to the script 108 almost exactly as if the DOM 204 were a client-side DOM of HTML A (106).
As illustrated in
The execution of the script 108 modifies the DOM 209. The DOM 209 now contains both the layout information and the initial content for the Web page; i.e., the DOM 209 now simulates the HTML B (114) illustrated in
In embodiments of the invention, the client 102 and the server 104 may locate on the same computer or on different computers in the distributed computing system 100.
The server 104 further includes a processor 304, memory 306, and an input/output interface 308, all communicatively connected together and to the network interface 302 by a communication bus 310. The processor 304 is configured to operate in accordance with computer program instructions stored in a memory, such as the memory 306. Program instructions may also be embodied in a hardware format, such as a programmed digital signal processor.
The memory 306 may be comprised of any type of storage facility, and may include, by way of example, RAM, ROM, and/or removable computer-readable media. The memory 306 may store an operating system 312 for controlling the operation of the server 104. The operating system 312 may be a general-purpose operating system such as a MICROSOFT server operating system, UNIX, or LINUX, for example.
As noted above, in exemplary embodiments of the invention, the server 104 builds an environment to simulate and execute a client-side script 108 that generates the initial content of a Web page. The simulation environment may include a DOM simulator to simulate the object model of a file, such as an HTML file, containing the source code of a Web page. The simulation environment may further include a server-side script engine that functions the same as the script engine used by the client 102. Therefore, as shown in
For ease of illustration,
Although aspects of the invention have been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
This application claims the benefit of U.S. Provisional Patent Application No. 60/716,299, filed on Sep. 12, 2005, titled “INITIAL SERVER-SIDE CONTENT RENDERING FOR CLIENT-SCRIPT WEB PAGES,” the disclosure of which is hereby expressly incorporated by reference, and the filing date of which is hereby claimed under 35 U.S.C. §119(e).
Number | Name | Date | Kind |
---|---|---|---|
5761683 | Logan et al. | Jun 1998 | A |
6035119 | Massena et al. | Mar 2000 | A |
6189030 | Kirsch et al. | Feb 2001 | B1 |
6470349 | Heninger et al. | Oct 2002 | B1 |
6578192 | Boehme et al. | Jun 2003 | B1 |
6625803 | Massena et al. | Sep 2003 | B1 |
6704024 | Robotham et al. | Mar 2004 | B2 |
7054952 | Schwerdtfeger et al. | May 2006 | B1 |
7519902 | Kraft et al. | Apr 2009 | B1 |
20010047394 | Kloba et al. | Nov 2001 | A1 |
20020054090 | Silva et al. | May 2002 | A1 |
20020069255 | Dinovo | Jun 2002 | A1 |
20020091840 | Pulier et al. | Jul 2002 | A1 |
20020103823 | Jackson et al. | Aug 2002 | A1 |
20020111967 | Nagase | Aug 2002 | A1 |
20020138660 | Eilers et al. | Sep 2002 | A1 |
20030014478 | Noble | Jan 2003 | A1 |
20030025728 | Ebbo et al. | Feb 2003 | A1 |
20030037021 | Krothappalli et al. | Feb 2003 | A1 |
20030050931 | Harman et al. | Mar 2003 | A1 |
20030088639 | Lentini et al. | May 2003 | A1 |
20030131048 | Najork | Jul 2003 | A1 |
20030135819 | Lakhdhir et al. | Jul 2003 | A1 |
20030200254 | Wei | Oct 2003 | A1 |
20030236825 | Kulkarni | Dec 2003 | A1 |
20040059809 | Benedikt et al. | Mar 2004 | A1 |
20040111488 | Allan | Jun 2004 | A1 |
20040133848 | Hunt et al. | Jul 2004 | A1 |
20040133855 | Blair et al. | Jul 2004 | A1 |
20040143787 | Grancharov et al. | Jul 2004 | A1 |
20040168122 | Murugaiyan | Aug 2004 | A1 |
20040177327 | Kieffer | Sep 2004 | A1 |
20040205650 | Cheng | Oct 2004 | A1 |
20040239681 | Robotham et al. | Dec 2004 | A1 |
20050027823 | Rana | Feb 2005 | A1 |
20050097008 | Ehring et al. | May 2005 | A1 |
20050102611 | Chen | May 2005 | A1 |
20050149857 | Negishi et al. | Jul 2005 | A1 |
20050160358 | Gumz et al. | Jul 2005 | A1 |
20060206589 | Lentini et al. | Sep 2006 | A1 |
20070136417 | Kreiner et al. | Jun 2007 | A1 |
20070256055 | Herscu | Nov 2007 | A1 |
Number | Date | Country |
---|---|---|
WO 2004055647 | Jul 2004 | WO |
Number | Date | Country | |
---|---|---|---|
20070061700 A1 | Mar 2007 | US |
Number | Date | Country | |
---|---|---|---|
60716299 | Sep 2005 | US |