1. Technical Field
The present disclosure relates to electronic devices and particularly, to an electronic device with a function of quickly opening web pages and a method thereof.
2. Description of Related Art
In general, network addresses of web pages that are frequently viewed by a user are saved as favorites. However, when the user wants to open one of the saved web pages and a net speed is slow, it will waste a lot of time for the user to wait until the web page is opened. Also, if a network connection is interrupted, the web page will not be displayed until the network connection is restored, it will also waste much time for the user.
Therefore, what is needed is an electronic device with a function of quickly opening a web page to overcome the described limitations.
The storage unit 20 is configured to store a number of network addresses and web data associated with each of the network addresses. The input unit 30 is configured to receive the network address inputted by a user. The display unit 40 is configured to display a web page based on the network address and the web data associated with the network address.
The processing unit 10 includes a receiving module 112, an identifying module 101, an acquiring module 102, a display module 103, and a linking module 104.
The receiving module 112 is configured to receive the network address from the input unit 30.
The identifying module 101 is configured to identify whether the input network address is one of the network addresses stored in the storage unit 20.
The acquiring module 102 is configured to acquire the web data associated with the input network address from the storage unit 20 when the input network address is one of the network addresses stored in the storage unit 20.
The display module 103 is configured to display a web page on the display unit 40 based on the acquired web data.
The linking module 104 is configured to establish a link between the electronic device 1 and the network server 2 according to the input network address and acquire the web data associated with the input network address from the network server 2, when the input network address is not one of the network addresses stored in the storage unit 20.
The display module 103 is further configured to display a web page on the display unit 40 based on the acquired web data from the network server 2.
The processing unit 10 further includes a detecting module 110, a storage module 106, a closing module 107, a comparing module 108 and an updating module 109.
The detecting module 110 is configured to detect whether there is a first close instruction or a second close instruction input by the user. If there is a first close instruction, the closing module 107 closes the web page being displayed on the display unit 40 and the linking module 104 disconnects the link between the electronic device 1 and the network server 2.
If there is a second close instruction, the storage module 106 acquires the network address and the web data of the web page from the network server 2, and saves the acquired network address and the web data to the storage unit 20 according to the second close instruction. The closing module 107 then closes the web page being displayed on the display unit 40 and the linking module 104 maintains the link between the electronic device 1 and the network server 2. The linking module 104 acquires new web data associated with the network address of the web page being saved in real time.
The comparing module 108 is configured to compare the new web data with corresponding original web data associated with the network address to determine whether the new web data is consistent with the original web data.
The updating module 109 is configured to update the web data associated with the network address in the storage unit 20 by replacing the original web data with the new web data when the new web data is not consistent with the original web data.
In step S601, the receiving module 112 receives the network address from the input unit 30.
In step S602, the identifying module 101 identifies whether the received network address is one of the network addresses stored in the storage unit 20, if yes, the procedure goes to step S603, if no, the procedure goes to step S605.
In step S603, the acquiring module 102 acquires the web data associated with the input network address from the storage unit 20.
In step S604, the display module 103 displays a web page on the display unit 40 based on the acquired web data.
In step S605, the linking module 104 establishes a link between the electronic device 1 and the network server 2 according to the input network address, and acquires the web data associated with the input network address from the network server 2.
In step S606, the display module 103 displays a web page on the display unit 40 based on the acquired web data from the network server 2.
In step S607, the detecting module 110 detects whether there is a first close instruction input by the user, if yes, the procedure goes to step S608, if no, the procedure goes to step S609.
In step S608, the closing module 107 closes the web page according to the first close instruction.
In step S610, the linking module 104 disconnects the link between the electronic device 1 and the network server 2.
In step S609, the detecting module 110 detects whether there is a second close instruction input by the user, if yes, the procedure goes to step S611, if no, the procedure goes to step S606.
In step S611, the storage module 106 acquires the network address and the web data of the web page from the network server 2, and saves the acquired network address and the web data to the storage unit 20 according to the second close instruction.
In step S612, the closing module 107 closes the web page being displayed on the display unit 40.
In step S613, the linking module 104 maintains the link between the electronic device 1 and the network server 2, acquires new web data associated with the network address of the web page being saved in real time.
In step S614, the comparing module 108 compares the new web data with the corresponding original web data associated with the network address to determine whether the new web data is consistent with the original web data, if yes, the procedure goes to step S616, if no, the procedure goes to step S615.
In step S615, the updating module 109 updates the web data associated with the network address in the storage unit 20 by replacing the original web data with the new web data when the new web data is not consistent with the original web data.
In step S616, the updating module 19 does not update the web data associated with the network address.
Although the present disclosure has been specifically described on the basis of the embodiments thereof, the disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiments without departing from the scope and spirit of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201110304827.8 | Oct 2011 | CN | national |