Closing a plurality of webpages in a browser

Embodiments of the present disclosure relate to a method for closing a plurality of webpages in a browser. According to the method, one or more records are acquired in response to receiving an instruction to close a first webpage. Each record comprises at least two URLs having a parent-child relationship. A URL chain of the first webpage is acquired based on the acquired one or more records in response to receiving an instruction to close a plurality of webpages related to the URL chain. The URL chain consists of a plurality of URLs having a multi-level parent-child relationship. The plurality of webpages related to the URL chain are closed.

BACKGROUND

The present invention relates to web applications, and more specifically, to methods, systems and computer program products for webpage management in a browser.

Nowadays, many people browse information resources on World Wide Web (WWW) using a web browser. Each individual webpage can be identified by a distinct Uniform Resource Locator (URL), enabling these resources to be acquired from a web server and be displayed on a client device.

SUMMARY

Embodiments of the present invention disclose methods, systems and computer program products. According to one embodiment of the present invention, one or more records are acquired in response to receiving an instruction to close a first webpage. Each record comprises at least two URLs having a parent-child relationship. A URL chain of the first webpage is acquired based on the acquired one or more records in response to receiving an instruction to close a plurality of webpages related to the URL chain. The URL chain consists of a plurality of URLs having a multi-level parent-child relationship. The plurality of webpages related to the URL chain are closed.

DETAILED DESCRIPTION

Characteristics are as follows:

Service Models are as follows:

Deployment Models are as follows:

When a user browses a webpage to look for some information, the user would go deep into many other related webpages through tags on the webpage. As more and more webpages are opened on one web browser, a large amount of CPU and memory resource are consumed. The user desires to clear up those unwanted webpages. A functionality provided is to close all webpages in a browser at a time. However, these functionalities are not convenient for a user if the user still wants to keep some of them. The user has to spend time closing the unwanted webpages one by one. A solution is provided to close a plurality of webpages which are related in the content. It costs a large amount of computing resource to analyze the relationship of the contents of the plurality of webpages. So it is desirable to close those unwanted webpages in a more efficient way.

According to embodiments of the present disclosure, a solution is proposed to allow a user to close a plurality of webpages having a multi-level parent-child relationship in a browser. The multi-level parent-child relationship of the plurality of webpages can be recorded in one or more records. These records can be analyzed to determine if a webpage to be closed has a URL chain consisting of a plurality of URLs having a multi-level parent-child relationship. The user can be provided a selection to close the plurality of webpages related to the URL chain. With this solution, the user need not individually visit each webpage and take decision of closing it. The webpages in a web browser are cleared up in a more efficient and more convenient way. A large amount of CPU and memory resource can be saved.

With reference now toFIG. 4, system400according to an embodiment of the present disclosure is depicted. System400may include recording engine401, closing engine402and storage403. Recording engine401and/or closing engine402can be integrated into a browser. Recording engine401and/or closing engine402can also be implemented as a plugin in a browser. The recording engine401comprises computer executed instructions to record one or more records, each record comprising at least two URLs with a parent-child relationship. Recording engine401can store a plurality of records in storage403. Closing engine402comprises computer executed instructions to acquire one or more records from computer readable storage403. Then closing engine402can determine if a webpage to be closed has a URL chain consisting of a plurality of URLs with a multi-level parent-child relationship. The embodiments of present disclosure will be described by referring to system400inFIG. 4.

According to an embodiment of present disclosure, a plurality of records are created to record a multi-level parent-child relationship of a plurality of webpages.FIG. 5describes an example method500for recording a parent-child relationship between two webpages according to an embodiment of the present disclosure. The method500can be implemented by recording engine401. The method500comprises S502-S506. At S502, in response to acquiring a request to access a new webpage, a URL of the new webpage is acquired from the request. At S504, it is determined that the new webpage and a current active webpage have a parent-child relationship in response to retrieving the URL of the new webpage from a URL list of the current active webpage. At S506, the parent-child relationship between the new webpage and the current active webpage is recorded as a record.

FIG. 6depicts a flowchart600of an example method500for recording a parent-child relationship between two webpages according to an embodiment of the present disclosure. The flowchart600comprises S602-S616.

At S602, a URL of the new webpage can be acquired from a request in response to acquiring a request to access a new webpage. At S604, it is determined whether a current active webpage exists. The current active webpage herein refers to a webpage being displayed currently. The current active webpage can be identified in browser. If the current active webpage exists, then the method goes to S606. If the current active webpage does not exist, then the method goes to S610. At S606, it is determined whether the URL of the new webpage can be retrieved from a URL list corresponding to the current active webpage. If the URL of the new webpage can be retrieved, then at S608, a parent-child relationship between the URL of the new webpage and a URL of the current active webpage can be recorded as a record. Then the method goes to S610. If the URL of the new webpage cannot be retrieved, then the method goes to S610. At S610, in response to receiving a response to the request from a web server, the new webpage is displayed on a browser. At S612, the new webpage is identified to be a current active webpage. At S614, all URLs included in the current active webpage can be acquired from the response. At S616, all URLs acquired can be recorded as a URL list corresponding to the current active webpage. It shall be understood that many methods can be applied to get a URL list from a webpage. For example, a Web crawler (also known as a Web spider or a Web robot) is a program or an automated script which can get a specified webpage from the Internet and extract all the links included in the webpages, then add the extracted links to the URL list corresponding to the webpage. Then the flowchart600goes to the end.

FIG. 7depicts a plurality of example webpages with a multi-level parent-child relationship according to an embodiment of the present disclosure. As shown inFIG. 7, webpage A is a first webpage a user has accessed. Webpages B and C are accessed from two tags on webpage A respectively. Webpage E is accessed from a tag on webpage B.

Webpage D has been assessed from a tag on webpage E. Webpage A and webpage B have a first level parent-child relationship in which Webpage A is a parent webpage and webpage B is a child webpage. Webpage A and webpage C have a first level parent-child relationship in which Webpage A is a parent webpage and webpage C is a child webpage. Webpage B and webpage E have a first level parent-child relationship in which Webpage B is a parent webpage and webpage E is a child webpage. Webpage E and webpage D have a first level parent-child relationship in which Webpage E is a parent webpage and webpage D is a child webpage. Webpage A and webpage E have a second level parent-child relationship in which Webpage A is a parent webpage and webpage E is a child webpage. Webpage B and webpage D have a second level parent-child relationship in which Webpage B is a parent webpage and webpage D is a child webpage. Webpage A and webpage D have a third level parent-child relationship in which Webpage A is a parent webpage and webpage D is a child webpage. Webpages A, B, E, and D have a multi-level parent-child relationship. Webpage B and Webpage C don't have a parent-child relationship but have a relative relationship. Webpage E and Webpage C have a relative relationship. Webpage D and Webpage C have a relative relationship. According to the present disclosure, if a plurality of webpages have a multi-level parent-child relationship, a plurality of URLs of the plurality of webpages can be defined to have the multi-level parent-child relationship. For example, URL1and URL2have a first level parent-child relationship in which URL1is a parent URL and URL2is a child URL. If two webpages have a relative relationship, two URLs of the two webpages can be defined to have the relative relationship. For example, URL2and URL4have a relative relationship. According to embodiments of present disclosure, a multi-level parent-child relationship includes a first level parent-child relationship, a second level parent-child relationship, a third level parent-child relationship and so on.

According to the method500, one and more records can be created to record a multi-level parent-child relationship of a plurality of URLs. With reference toFIG. 7, a process of creating a plurality of records comprising a plurality of URLs with a multi-level parent-child relationship will be described.

At first, after a user opens a browser and inputs a URL1on a browser, the browser receives a request to access webpage A. The recording engine401acquires URL1from the request. As webpage A is a first webpage requested on the browser, a current active webpage does not exist. After a response to the request is received and webpage A is displayed on the browser, webpage A is identified to be a current active webpage. Then all URLs included in webpage A are acquired from the response. All URLs included in webpage A are recorded as a URL list corresponding to webpage A. For example, Table 1 shows an example URL list corresponding to webpage A.

Secondly, the user clicks a tag on webpage A and would access webpage B. According to the above method500, the browser receives a request to access webpage B. The recording engine401acquires URL2from the request. As a current active webpage A exists, the recording engine401searches the URL list corresponding to webpage A for URL2. After URL2is retrieved in the URL list, it indicates that webpage A and webpage B have a parent-child relationship. In this case, webpage A is called a parent webpage and webpage B is called a child webpage. URL1and URL2are saved as a record in Table 2.

After the response to the request is received and webpage B is displayed on the browser, webpage B is identified to be a current active webpage. Then all URLs included in webpage B are acquired from the response. All URLs included in webpage B are recorded as a URL list corresponding to webpage B. For example, Table 3 shows an example URL list corresponding to webpage B.

TABLE 3URL 2http//:www.street.com/homepage/sports/abcdURL 3http://www.weather.com/home/electronics/3478URL chttp://en.wikipedia.org/wiki/education. . .. . .
Thirdly, the user clicks a tag on webpage B and would access webpage E. Similarly, the browser receives a request to access webpage E. The recording engine401acquires URL3from the request. As a current active webpage B exists, the recording engine401searches the URL list corresponding to webpage B in Table 3 for URL3. After URL3is retrieved in Table 3, it indicates that webpage B and webpage E have a parent-child relationship. In this case, webpage B is called a parent webpage and webpage B is called a child webpage. URL2and URL3are added to Table 2 as a record.

The parent-child relationship between webpage B and webpage E is added to Table 2 as a record. After the response to the request is received and webpage E is displayed on the browser, webpage E is identified to be a current active webpage. Then all URLs included in webpage E are acquired from the response. All URLs included in webpage E are recorded as a URL list corresponding to webpage E in Table 4.

Furthermore, the user clicks a tag on webpage E and would access webpage D of the tag. Similarly, the browser receives a request to access webpage D. The recording engine401acquires URL5from the request. As a current active webpage E exists, the recording engine401searches the URL list corresponding to webpage E in Table 4 for URL5. After URL5is retrieved in Table 4, it indicates that webpage E and webpage D have a parent-child relationship. URL3and URL5are added to Table 2 as a record. After the response to the request is received and webpage D is displayed on the browser, webpage D is identified to be a current active webpage. Then all URLs included in webpage D are acquired from the response. All URLs included in webpage D are recorded as a URL list corresponding to webpage D (Not shown).

TABLE 2URL of Parent webpageURL of Child webpageRecord 1URL 1URL 2Record 2URL 2URL 3Record 3URL 3URL 5
Finally, the user clicks a tag of webpage A, and webpage A is displayed on the browser. Webpage A is identified to be a current active webpage by the recording engine401. The user further clicks a tag on webpage A and would access webpage C. The browser receives a request to access webpage C. The recording engine401acquires URL4from the request. As a current active webpage A exists, the recording engine401searches the URL list corresponding to webpage A in Table 1 for URL4. After URL4is retrieved in Table 1, it indicates that webpage A and webpage C have a parent-child relationship. URL1and URL4are added to Table 2 as a record.

After the response to the request is received and webpage C is displayed on the browser, webpage C is identified to be a current active webpage. Then all URLs included in webpage C are acquired from the response. All URLs included in webpage C are recorded as a URL list corresponding to webpage C (Not shown).

According to an embodiment, a plurality of records about the plurality of URLs with a multi-level parent-child relationship can be organized in a data structure with key-value such as a child HashMap. The child HashMap includes one or more records. Each record includes a URL of a parent webpage and at least one child URL of the URL of a parent webpage. In one embodiment, in each record, a URL of each parent webpage can be saved as a key in the child HashMap, at least one URL of at least one first level child webpage of a parent webpage can be saved as at least one value corresponding to the key in the child HashMap. A plurality of keys in the child HashMap constitute a key set. A plurality of values corresponding to a key constitute a value set. As shown in Table 5, URLs1,2, and3of Parent webpages A, B and E are respective keys in the child HashMap. The key set includes URLs1,2, and3. URLs2and4of child webpages B and C are values of URL1. URL3of child webpage E is a value of URL2. URL5of child webpage D is a value of URL3.

According to an embodiment, one or more records comprising a plurality of URLs with a multi-level parent-child relationship can be organized in a data structure with key-value such as a parent HashMap. For each child webpage of the plurality of child webpages, a URL of each child webpage can be saved as a key in the parent HashMap, and at least one URL of at least one first level parent webpage of each child webpage can be saved as at least one value corresponding to the key in the child HashMap. As shown in Table 6, URLs2,3,4, and5of child webpages B, E, C and D are respective keys in the parent HashMap. URL1of parent webpage A is a value of URL2. URL1of parent webpage A is a value of URL4. URL3of parent webpages E is a value of URL5. URL2of parent webpage B is a value of URL3. Child webpage B and Parent webpage A are constructed to be a first level parent-child relationship. Child webpage C and Parent webpage A are constructed to be a first level parent-child relationship. Child webpage D and Parent webpage E are constructed to be a first level parent-child relationship. Child webpage E and Parent webpage B are constructed to be a first level parent-child relationship. Child webpage D and Parent webpage B are constructed to be a second level parent-child relationship. Child webpage E and Parent webpage A are constructed to be a second level parent-child relationship. Child webpage D and Parent webpage A are constructed to be a third level parent-child relationship.

The records in Tables 2, 5, and 6 are for purposes of illustration but are not intended to be exhaustive or limited to the embodiments disclosed. Those in the art should understand that the records can also be saved in a form of a file such as XML, file or other data structures.

FIG. 8depicts an example method800for closing a plurality of webpages in a browser according to an embodiment of the present invention. The method800can be implemented in closing engine402. The method800comprises S802-S806.

At S802, in response to receiving an instruction to close a webpage, one or more records are acquired. Each record comprises at least two URLs with a parent-child relationship. At S804, a URL chain of the webpage is acquired based on the acquired one or more records in response to receiving an instruction to close a plurality of webpages related to the URL chain. The URL chain consists of a plurality of URLs with a multi-level parent-child relationship. At S806, the plurality of webpages related to the URL chain are closed.

FIG. 9depicts a flowchart900of example method800for closing a plurality of webpages in a browser according to an embodiment of the present invention.

At S902, in response to receiving an instruction to close a webpage, one or more records are acquired. As described in above method500and flowchart600, when a request to access a new webpage is acquired, it is determined if the new webpage and a current active webpage have a parent-child relationship. If the determination result is Yes, then the parent-child relationship between the new webpage and the current active webpage is recorded as a record. According to an embodiment, closing engine402can access storage403to acquire one or more records in a child HashMap or in a parent HashMap. Each record in a child HashMap or in a parent HashMap comprises at least two URLs with a parent-child relationship.

At S904, it is determined whether the webpage has a URL chain based on the acquired one or more records. The URL of the webpage can be searched in one or more records. In an embodiment, a functionality to close at least one multi-level child URL of a webpage is provided. the URL of the webpage can be searched in a key set of a child HashMap. If the URL of the webpage cannot be found, it indicates that the URL of the webpage is not a parent URL. Then the process goes to S906, the webpage is closed. The Process goes to the end. If the URL of the webpage can be retrieved, it indicates that the URL of the webpage is a parent URL and has a URL chain. In another embodiment, a functionality to close at least one multi-level child URL of a webpage and at least one multi-level parent URL of a webpage is provided. The URL of the webpage can be searched in both a key set of a child HashMap and a key set of a parent HashMap. If the URL of the webpage cannot be found, it indicates that the URL of the webpage is neither a parent URL or a child URL and has not a URL chain. Then the process goes to S906, the webpage is closed. The Process goes to the end. If the URL of the webpage can be retrieved, it indicates that the URL of the webpage is either a parent URL or a child URL and has a URL chain.

According to an embodiment, if the URL of the webpage has at least one first level child URL, for each first level child URL of at least one first level child URL, it is necessary to traverse the one or more records to determine if each first level child URL has at least one child URL. If a first level child URL has at least one child URL, it indicates that URL of the webpage has at least one second level child URL. Then for each second level child URL, above traverse process is repeated. The traverse process can be stopped until one multi-level child URL does not have any further child URL. By this method, at least one multi-level child URL of the URL of the webpage can be determined and recorded. The URL chain of the webpage comprises the URL of the webpage and the at least one multi-level child URL.FIG. 10depicts an example flowchart1000for acquiring at least one multi-level child URL according to an embodiment of the present invention. The flowchart method1000is implemented for searching at least one multi-level child URL of each child URL of at least one multi-level child URL. At S1002, a current child URL is searched in a key set of a child HashMap. At S1004, if the current child URL cannot be retrieved, then at S1008, the current child URL is recorded. If the current child URL can be retrieved, then at S1006, all child URLs of the current child URL are recorded. After the flowchart method1000is repeatedly implemented for each child URL of at least one multi-level child URL, at least one multi-level child URL of the URL of the webpage can be acquired.

In an embodiment, if the URL of a webpage to be closed has at least one multi-level parent URL, for each first level parent URL of at least one first level parent URL, it is necessary to traverse the one or more records to determine if each first level parent URL has at least one parent URL. If a first level parent URL has at least one parent URL, it indicates that URL of the webpage has at least one second level parent URL. Then for each second level parent URL, above traverse process is repeated. The traverse process can be stopped until one multi-level parent URL does not have any further parent URL. By this method, at least one multi-level parent URL of the URL of the webpage can be determined and recorded. The URL chain of the webpage comprises the URL of the webpage and the at least one multi-level parent URL.FIG. 11describes an example flowchart1100for acquiring at least one multi-level parent URL according to an embodiment of the present invention. The flowchart method1100is implemented for each parent URL of at least one multi-level parent URL. At S1102, a current parent URL is searched in a key set of a parent HashMap. At S1104, if the current parent URL cannot be retrieved, then At S1108, the current parent URL is recorded. If the current parent URL can be retrieved, then At S1106, all parent URLs of the current parent URL are recorded. After the flowchart method1100is repeatedly implemented for each child URL of at least one multi-level parent URL, at least one multi-level parent URL of the URL of the webpage can be acquired.

According to an embodiment, if the URL of a webpage to be closed has at least one multi-level child URL and/or at least one multi-level parent URL. Then it can be determined that the webpage has a URL chain comprising the URL of the webpage, the at least one multi-level child URL and the at least one multi-level parent URL. The at least one multi-level child URL and the at least one multi-level parent URL can be determined respectively by referring to the above flowchart methods1000and1100.

According to an embodiment, if the URL of a webpage to be closed has at least one multi-level child URL and/or at least one multi-level parent URL and/or at least one relative URL. Then it can be determined that the current active webpage has a URL chain comprising the URL of the current active webpage and the at least one multi-level child URL and/or the at least one multi-level parent URL and/or the at least one relative URL. The at least one multi-level child URL and the at least one multi-level parent URL can be determined respectively by referring to the above flowchart methods900and1000. For each parent URL of the at least one multi-level parent URL, it is necessary to traverse the child HashMap to determine if at least one other child URL than the retrieved at least one multi-level child URL exists. If the at least one other child URL exists, it indicates that the URL of the webpage has at least one relative URL. Then at least one relative URL can be determined and required if the at least one relative URL has at least one multi-level child URL by referring to the above flowchart methods1000.

At S908, in response to receiving an instruction to close a plurality of webpages related to the URL chain, the URL chain of the webpage to be closed is acquired. A user can be provided a selection of closing a plurality of webpages related to the URL chain. For example, a prompt box is shown in a user interface of a browser. In one embodiment, the prompt box is “Would you close all child webpages?”. In another embodiment, the prompt box is “Would you close all parent webpages?”. In yet another embodiment, the prompt box is “Would you close all child webpages and parent webpages?” or “Would you close all child webpages and parent webpages and relative webpages?”. In response to user's selection, a URL chain of the webpage can be acquired, then a plurality of webpages corresponding to a set of URLs included in the URL chain would be closed.

At S910, the plurality of webpages related to the URL chain are closed. In the case that the user selects to close a webpage and its multi-level child webpages and the URL chain of the webpage comprises the URL of the webpage and the at least one multi-level child URL, the webpage and at least one multi-level child webpage may be closed. All URLs included in the URL chain are deleted from the value sets of the records in a child HashMap. If the URLs in the key sets of the records don't have any child URL anymore, the URLs are deleted from the key sets of the records in the child HashMap. In the case that the user selects to close a webpage and its multi-level parent webpages and the URL chain of the webpage comprises the URL of the webpage and the at least one multi-level parent URL, the webpage and at least one multi-level parent webpage may be closed. All URLs included in the URL chain are deleted from the value sets of the records in a parent HashMap. If the URLs in the key sets of the records don't have any parent URL anymore, the URLs are deleted from the key sets of the records in the parent HashMap. In the case that the user selects to close a webpage and its multi-level parent and its multi-level child URL and the URL chain of the webpage comprises the URL of the webpage and at least one multi-level child URL and at least one multi-level parent URL, the webpage and at least one multi-level child webpage and at least one multi-level parent webpage may be closed. All URLs included in the URL chain are deleted from the value sets of the records in a child HashMap and in a parent HashMap. If the URLs in the key sets of the records in the child HashMap don't have any child URL anymore, the URLs are deleted from the key sets of the records in the child HashMap. If the URLs in the key sets of the records in the parent HashMap don't have any parent URL anymore, the URLs are deleted from the key sets of the records in the parent HashMap. In the case that the user selects to close a webpage and/or its multi-level parent and/or child and/or relative URL and the URL chain of the webpage comprises the URL of the webpage and/or at least one multi-level child URL and/or at least one multi-level parent URL and/or at least one relative URL. The webpage, at least one multi-level child webpage, at least one multi-level parent webpage and at least one relative webpage may be closed. After that, all URLs included in the URL chain are deleted from the value sets of the records in a child HashMap and/or in a parent HashMap. If the URLs in the key sets of the records in the child HashMap don't have any child URL anymore, the URLs are deleted from the key sets of the records in the child HashMap. If the URLs in the key sets of the records in the parent HashMap don't have any parent URL anymore, the URLs are deleted from the key sets of the records in the parent HashMap.

According to an embodiment, it is assumed that webpage B inFIG. 7is a webpage to be closed. At least one multi-level child URL of webpage B can be determined in this embodiment combining with Table 5. URL2of webpage B can be found in a key set of Table 5, which indicates that URL2is a parent URL. URL3can be acquired from a value set corresponding to URL2, which indicates that URL3is a child URL of URL2. Then URL3is searched in the key set of Table 5. After URL3is found in the key set of Table 5, URL5can be acquired from a value set corresponding to URL3. It indicates that URL5is a child URL of URL3. Then URL5is searched in the key set of Table 5. As URL5cannot be found in the key set of Table 5, it indicates that URL5is not a parent URL. For the parent URL2, URL3is a first level child URL and URL5is a second level child URL. The URL chain of webpage B comprises URL2, URL3and URL5. After receiving an instruction to close a plurality of webpages related to the URL chain of webpage B, webpages E and D would be closed together with webpage B. Then URL2, URL3and URL5are deleted from the records1,2and3in Table 5. The records2and3are deleted from Table 5.

According to an embodiment, it is assumed that webpage E inFIG. 7is a webpage to be closed. At least one multi-level parent URL of webpage E can be determined in this embodiment combining with Table 6. URL3is searched in the key set of Table 6. URL3can be retrieved in a key set of Table 6 which indicates that URL3is a child URL. URL2can be acquired from a value set corresponding to URL3. It indicates that URL2is a parent URL of URL3. Then URL2is searched in the key set of Table 6. URL2can be found in the key set of Table 6, which indicates that URL2is a child URL. URL1can be acquired from a value set corresponding to URL2. It indicates that URL1is a parent URL of URL2. Then URL1is searched in the key set of Table 6. As URL1cannot be found in the key set of Table 6, it indicates that URL1is not a child URL. For the child URL3, URL2is a first level parent and URL1is a second level parent. The URL chain of webpage E comprises URL3, URL2and URL1. After receiving an instruction to close a plurality of webpages related to the URL chain of webpage E, webpages B and A would be closed together with webpage E. URLs3,2and1are deleted from the value sets of the records1,2,3and4in Table 6. As URLs2,4,5and3in the key sets of records1,2,3and4don't have any parent URL, URLs2,4,5and3are deleted from records1,2,3and4. In other words, the records1,2,3and4don't exist anymore.

According to an embodiment, it is assumed that a webpage to be closed is webpage E inFIG. 6. At least one multi-level child URL and at least one multi-level parent URL of webpage E can be determined in this embodiment combining with Table 5 and Table 6. The parent URLs of URL3can be determined to be URL2and URL1as above embodiment. The child URL of URL3can be determined to be URLS as above embodiment. The URL chain of webpage E comprises URL3, URL2, URL1and URL5. After receiving an instruction to close a plurality of webpages related to the URL chain of webpage E, Webpages A, B and D would be closed together with webpage E. The records2and3are deleted from Table 5 and the records1,2,3and4are deleted from Table 6.

According to an embodiment, it is assumed that a webpage to be closed is webpage E inFIG. 7. At least one multi-level child URL, at least one multi-level parent URL and at least one relative URL of webpage E can be determined in this embodiment combining with Table 5 and Table 6. As described in above embodiment, URL2and URL1are determined to be the parent URLs of URL3. URLS can be determined to be the child URL of URL3. After traversing Table 5, URL4can be determined to be another child of parent URL1. URL4is a relative URL of URL3. The URL chain of webpage E comprises URL3, URL2, URL1, URL5and URL4. After receiving an instruction to close a plurality of webpages related to the URL chain of webpage E, webpage A, B, C, D would be closed together with webpage E. All records in Table 5 and Table 6 are deleted.