Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method and System for Updating Minimal Number of Nodes in a DOM Tree during Partial Page Load

IP.com Disclosure Number: IPCOM000237237D
Publication Date: 2014-Jun-10
Document File: 4 page(s) / 193K

Publishing Venue

The IP.com Prior Art Database

Related People

Diptendu Bhowmick: INVENTOR

Abstract

A method and system is disclosed for updating minimal number of nodes in the Document Object Model (DOM) tree of a web page during partial page load. The method and system compares the old DOM tree with the new one for identifying the minimal number of nodes to be replaced. During a partial page load, the method and system makes use of the underlying list structure in the web page to determine the least difference between two DOM trees.

This text was extracted from a Microsoft Word document.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 46% of the total text.

Method and System for Updating Minimal Number of Nodes in a DOM Tree during Partial Page Load

Abstract

A method and system is disclosed for updating minimal number of nodes in the Document Object Model (DOM) tree of a web page during partial page load.  The method and system compares the old DOM tree with the new one for identifying the minimal number of nodes to be replaced.  During a partial page load, the method and system makes use of the underlying list structure in the web page to determine the least difference between two DOM trees.

Description

In a modern multipage application a partial page load occurs when user clicks on a different section of the webpage.  During the partial page load the browser makes one or multiple AJAX calls to the server.  Upon getting the response back it refreshes the content of some module or changes a part of the page.  To render the new content browser changes the DOM tree of the web page.  By reducing the number of nodes in the DOM tree to be updated, a cost of rendering the web page can be reduced significantly.

A method and system is disclosed for updating a minimal number of nodes in a DOM tree of a web page during a partial page load. 

The method and system uses a browser for updating the DOM tree and a rendering tree with layout information during partial page load.  Updating the DOM tree can involve replacing an old DOM tree with a new DOM tree.  Thereafter, the method and system uses the browser for painting a part of the web page to be refreshed.  Painting can result in repaint and re-layout of the entire web page.

The method and system also includes reattaching event handlers of nodes in the old DOM tree with the new DOM tree.  Event handlers attached to nodes of the old DOM tree are thereafter destroyed.

The method and system can be used in scenarios wherein; a minor portion of the web page gets updated based on some user action, while the major portion of the web page stays the same.  For example, the method and system can be used in a scenario wherein a user is updating settings for a friend on a web page containing a friends list as shown in fig. 1.

Figure 1

The method and system can also be used in scenarios wherein a user clicks on a link in the web page to check for new emails without doing a full page refresh as shown in fig. 2.

Figure 2

In an exemplary implementation, the method and system analyzes a list structure in the markup of web page in order to identify the minimum difference between the old and new markup.  Without losing any generality the implementation assumes that the list structure contains at least X list items, where X is an application dependent configurable parameter.  Additionally, all items in the list have the same HTML structure.  In accordance with the implementation, once the method and system identifies the minimal number of nodes to be updated in the DOM tree, only nodes identified as belonging to a set containing the minimal number of nodes are...