METHOD AND DEVICE OF DISPLAYING WEBPAGE
Techniques pertaining to a webpage display are disclosed. According to one aspect of the present invention, a method of displaying a webpage comprises parsing a plurality of elements of a webpage successively until recognizing a first screen element, which is defined for a first screen of the webpage, and displaying the first screen of the webpage based on the plurality of elements previously parsed. Thus, the screen of the webpage is displayed without any delay.
1 . A method of displaying a webpage, comprising:
parsing a plurality of elements of a webpage successively until recognizing a first screen element, which is defined for a first screen of the webpage; and
displaying the first screen of the webpage based on the plurality of elements previously parsed.
2 . The method according to claim 1 , further comprising:
parsing the first screen element and rest of the elements of the webpage successively; and
displaying a complete webpage based on parsed elements of the webpage.
3 . The method according to claim 1 , wherein the first screen element is recognized through a mark which is configured to define at least one first screen element.
4 . The method according to claim 3 , wherein the mark is obtained during parsing a header of the webpage.
5 . The method according to claim 3 , wherein the mark is obtained during parsing the plurality of the elements of the webpage.
6 . The method according to claim 3 , wherein the mark is set as a Cascading Style Sheet (CSS) attribute added into the first screen element, or the mark is set as a CSS media query which is configured into the header of the webpage.
7 . The method according to claim 3 , wherein the mark is configured to define one first screen element according to a screen-size of a device using to display the webpage.
8 . The method according to claim 3 , wherein the mark is configured to define a plurality of first screen elements to adapt multiple screen-sizes.
9 . The method according to claim 8 , wherein one of the first screen elements suitable for a device used to display the webpage is determined according to the screen-size of the device during parsing a header of the webpage.
10 . A device of displaying a webpage, comprising:
a layout engine configured to parse a plurality of elements of a webpage successively until recognizing a first screen element, which is defined for a first screen of the webpage; and
a displaying module configured to display the first screen of the webpage based on the plurality of elements previously parsed.
11 . The device according to claim 9 , wherein
the layout engine is further configured to parse the first screen element and the rest of the elements of the webpage successively; and
the display module is further configured to display a complete webpage based on parsed elements of the webpage.
12 . The device according to claim 10 , wherein the first screen element is recognized through a mark which is configured to determine at least one first screen element.
13 . The device according to claim 12 , wherein the mark is obtained during parsing a header of the webpage.
14 . The device according to claim 12 , wherein the mark is obtained during parsing the plurality of elements of the webpage.
15 . The device according to claim 12 , wherein the mark is set as a CSS attribute added into the first screen element, or the mark is set as a CSS media query which is configured into the header of the webpage.
16 . The device according to claim 12 , wherein the mark is configured to determine one first screen element according to a screen-size of a device used to display the webpage.
17 . The device according to claim 12 , wherein the mark is configured to define a plurality of first screen elements to adapt multiple screen-sizes.
18 . The device according to claim 17 , wherein one of the first screen elements suitable for a device used to display the webpage is determined according to the screen-size of the device during parsing a header of the webpage.