[go: up one dir, main page]

CN103581232A - Web page transmission method, web page displaying device and system including device - Google Patents

Web page transmission method, web page displaying device and system including device Download PDF

Info

Publication number
CN103581232A
CN103581232A CN201210262011.8A CN201210262011A CN103581232A CN 103581232 A CN103581232 A CN 103581232A CN 201210262011 A CN201210262011 A CN 201210262011A CN 103581232 A CN103581232 A CN 103581232A
Authority
CN
China
Prior art keywords
resource
priority
web page
web server
source code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210262011.8A
Other languages
Chinese (zh)
Other versions
CN103581232B (en
Inventor
邓灵莉
王皘
陆璐
彭晋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201210262011.8A priority Critical patent/CN103581232B/en
Publication of CN103581232A publication Critical patent/CN103581232A/en
Application granted granted Critical
Publication of CN103581232B publication Critical patent/CN103581232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

本申请提供了一种web页面传输方法,其中所述web页面中的资源预先配置有优先级。所述方法包括:浏览器从web服务器获取所述web页面的源代码文件;浏览器解析所述源代码文件以从中提取出所述资源的优先级;浏览器向web服务器发送资源请求,所述请求中携带有所述资源的优先级;以及web服务器按照所述资源的优先级次序向浏览器发送所述资源。根据本申请,由网页开发者直接预先配置网页内资源的优先级,具有更灵活、更具普遍适应性的无限并行数据流的序列化,同时,如此开发的页面具有更符合网页开发者需求的页面呈现效果。

Figure 201210262011

The present application provides a web page transmission method, wherein resources in the web page are pre-configured with priorities. The method includes: the browser obtains the source code file of the web page from the web server; the browser parses the source code file to extract the priority of the resource; the browser sends a resource request to the web server, and the The request carries the priority of the resource; and the web server sends the resource to the browser according to the priority order of the resource. According to this application, the priority of resources in the webpage is directly pre-configured by the webpage developer, which has a more flexible and universally adaptable serialization of infinite parallel data streams. Page rendering effect.

Figure 201210262011

Description

web页面传输方法、web页面显示装置及包含该装置的系统Web page transmission method, web page display device and system including the device

技术领域 technical field

本申请涉及数据通信领域,更具体地,涉及web页面传输方法、web页面的显示装置及web页面的传输与显示系统。The present application relates to the field of data communication, and more specifically, to a web page transmission method, a web page display device, and a web page transmission and display system.

背景技术 Background technique

随着计算机网络技术的日益发展,人们可以通过因特网访问数百万的网站以及数十亿的web页面。当用户希望访问某个web页面时,可以打开浏览器在地址栏中输入该web页面的URL。浏览器基于该URL向web服务器发送访问该web页面的请求。web服务器响应于浏览器的请求,将该web页面的源代码文件(例如,HTML文件)发送到浏览器。浏览器接收到该web页面的源代码文件后会对其进行解析,之后会针对web页面中的各个资源(例如,Javascript文件、图片、文字、样式表等)分别向web服务器发送资源请求,并且从web服务器获取到所请求的资源后将相应的页面内容呈现给用户。With the increasing development of computer network technology, people can access millions of websites and billions of web pages through the Internet. When the user wishes to visit a certain web page, he can open a browser and input the URL of the web page in the address bar. The browser sends a request for accessing the web page to the web server based on the URL. The web server sends the source code file (eg, HTML file) of the web page to the browser in response to the browser's request. After receiving the source code file of the web page, the browser will parse it, and then send resource requests to the web server for each resource (such as Javascript file, picture, text, style sheet, etc.) in the web page, and After obtaining the requested resource from the web server, the corresponding page content is presented to the user.

一个web页面中可以呈现多种类型的内容,例如文字、静态的图形、动画等。然而,浏览器往往不需要将某个web页面中的全部内容同时呈现在用户面前。每个web页面中都存在对用户体验起决定性作用的对象小集合。例如,用户比较关心的内容和用户使用度较高的内容需要优先呈现给用户,而对于用户而言相对不重要的内容和用户使用度较低的内容可以稍缓呈现给用户。为了将用户比较关心的内容和用户使用度较高的内容优先呈现给用户,因而希望从web服务器获取到与该内容相关的资源。因此,希望根据web页面中需要显示的内容的重要性和使用度等,对相应的资源标注优先级,使得优先级较高的资源请求优先得到web服务器的响应。A web page can present various types of content, such as text, static graphics, animation, and the like. However, the browser often does not need to present all the content in a certain web page to the user at the same time. Within every web page there exists a small collection of objects that are critical to the user experience. For example, the content that the user is more concerned about and the content that the user uses more frequently need to be presented to the user first, while the content that is relatively unimportant to the user and the content that the user uses less frequently can be presented to the user later. In order to present to the user the content that the user cares about and the content that the user uses highly, it is hoped to obtain resources related to the content from the web server. Therefore, it is hoped that according to the importance and usage of the content to be displayed in the web page, the corresponding resources are prioritized, so that resource requests with higher priority are preferentially responded by the web server.

为此,谷歌公司开发了一种新的网络协议——SPDY(音同“speedy”)协议。SPDY协议是对HTTP协议的增强,其允许数据流的多路复用、请求优先级、以及HTTP包头压缩。根据SPDY协议,浏览器在请求资源时指定所请求的资源的优先级,而指定优先级的方案是根据预定的规则,依照不同资源的不同文件类型进行指定,例如*.htm文件的优先级最低,*.js等脚本文件的优先级次之,而*.jpg、*.gif、*.png等图片文件的优先级最高。To this end, Google has developed a new network protocol - SPDY (pronounced "speedy") protocol. The SPDY protocol is an enhancement to the HTTP protocol that allows multiplexing of data streams, request prioritization, and HTTP header compression. According to the SPDY protocol, the browser specifies the priority of the requested resource when requesting resources, and the scheme of specifying the priority is to specify according to different file types of different resources according to predetermined rules, for example, *.htm files have the lowest priority , script files such as *.js have the second priority, and image files such as *.jpg, *.gif, and *.png have the highest priority.

然而,现有的支持SPDY协议的浏览器(例如Chrome和Firefox浏览器)对于资源优先级的指定方案仅依赖于资源的文件类型,在某些情况下无法满足用户对不同类型的web页面中不同资源的呈现优先级的需求。例如,浏览以图片呈现为主的网站的用户希望图片的呈现优先级高于文字,而浏览以资讯为主的网站的用户希望文字的呈现优先级高于图片。而按照SPDY协议的资源优先级指定方案,对这两类网站中的图片均赋予最高的优先级,因而被最先呈现给用户。这样将不能满足这两类网站的用户的实际需求。However, the existing browsers that support the SPDY protocol (such as Chrome and Firefox browsers) only rely on the resource file type for resource priority designation schemes, and in some cases cannot satisfy users' requirements for different types of web pages. Rendering priority requirements for resources. For example, a user who browses a website mainly displaying pictures wishes that the presentation priority of pictures is higher than that of text, and a user browsing a website mainly of information wishes that the presentation priority of text is higher than that of pictures. According to the resource priority designation scheme of the SPDY protocol, the pictures in these two types of websites are given the highest priority, and thus are presented to the user first. This will not be able to meet the actual needs of users of these two types of websites.

此外,针对现有的web技术中不允许web页面设计者对布局的不同部分标注优先级,也不存在能够在运行时实行web内容的优先级的问题,第200710003983.4号中国专利申请中提出了一种控制web页面在客户端上的显示的方法,其中所述web页面中的各内容被分配了不同的优先级。所述方法包括:从客户端向服务器发送对web页面的访问请求,响应于所述请求,服务器将用于在所述web页面中实现各内容的优先级化的控制部件发送到客户端,并且所述控制部件根据所述web页面中各内容的优先级的顺序从服务器取回内容并进行显示。In addition, in view of the fact that the existing web technology does not allow the web page designer to mark the priority of different parts of the layout, and there is no problem that the priority of the web content can be implemented at runtime, the Chinese patent application No. 200710003983.4 proposes a A method for controlling the display of a web page on a client, wherein each content in the web page is assigned different priorities. The method includes: sending an access request to a web page from a client to a server, in response to the request, the server sends to the client a control component for prioritizing each content in the web page, and The control component retrieves content from the server according to the order of priority of each content in the web page and displays it.

然而,该方案对优先级的支持很大程度上依赖于服务器返回的控制部件,浏览器需要很好地与之协同,才能完成资源的优先级调度。且在该方案中,优先级调度的执行者放在了浏览器,无疑为浏览器的页面加载过程添加了更为复杂的处理逻辑,考虑到浏览器所在终端设备的处理能力,可能会增大页面加载时延。同时,该方案没有考虑对一个页面内资源的并发请求的状况,而当今的web页面浏览中,对一个主机建立多个TCP连接进行资源的并发请求已经十分普遍,单纯由浏览器控制的资源优先级调度,无法实现各TCP连接间的同步控制,依照优先级的次序发起的资源请求不一定按照发送的顺序到达服务器,即使按序到达服务器也不一定按序被服务器响应,显然这种方案无法保证浏览器在实际页面浏览中,按照期望的优先级的顺序获取到资源,也就无法保证方案中所描述的资源的严格优先级。However, the scheme's support for priority largely depends on the control components returned by the server, and the browser needs to cooperate well with it to complete resource priority scheduling. And in this solution, the executor of priority scheduling is placed in the browser, which undoubtedly adds more complex processing logic to the browser's page loading process. Considering the processing capability of the terminal device where the browser is located, it may increase Page load delays. At the same time, this solution does not consider the situation of concurrent requests for resources in a page. In today's web page browsing, it is very common to establish multiple TCP connections for a host to make concurrent requests for resources. Resources that are purely controlled by the browser are preferred. Scheduling at the same level, it is impossible to achieve synchronous control between TCP connections. Resource requests initiated in the order of priority do not necessarily arrive at the server in the order they are sent, and even if they arrive at the server in order, they may not be responded to by the server in order. Obviously, this solution cannot To ensure that the browser obtains the resources in the order of the expected priority in the actual page browsing, it cannot guarantee the strict priority of the resources described in the scheme.

发明内容 Contents of the invention

鉴于现有技术中存在的上述问题,根据本申请的第一方面,提供了一种web页面传输方法,所述web页面中的资源预先配置有优先级。所述方法包括:浏览器从web服务器获取所述web页面的源代码文件;浏览器解析所述源代码文件以从中提取出所述资源的优先级;浏览器向web服务器发送资源请求,所述请求中携带有所述资源的优先级;以及web服务器按照所述资源的优先级次序向浏览器发送所述资源。In view of the above-mentioned problems in the prior art, according to the first aspect of the present application, a web page transmission method is provided, where resources in the web page are pre-configured with priorities. The method includes: the browser obtains the source code file of the web page from the web server; the browser parses the source code file to extract the priority of the resource; the browser sends a resource request to the web server, and the The request carries the priority of the resource; and the web server sends the resource to the browser according to the priority order of the resource.

根据本申请的第二方面,提供了一种web页面显示装置,其包括:数据通信模块,从web服务器获取所述web页面的源代码文件,其中,所述web页面中的资源预先配置有优先级;解析模块,解析所述源代码文件以从中提取出所述资源的优先级,并将提取出的资源的优先级发送到所述数据通信模块;以及显示模块,显示与从web服务器获取的资源对应的内容;其中,所述数据通信模块进一步被配置为:将携带有所述资源的优先级的资源请求发送到web服务器以及从web服务器接收所述资源。According to the second aspect of the present application, a web page display device is provided, which includes: a data communication module, which acquires the source code file of the web page from a web server, wherein the resources in the web page are pre-configured with priority level; a parsing module, parsing the source code file to extract the priority of the resource therefrom, and sending the extracted resource priority to the data communication module; and a display module, displaying and obtaining from the web server The content corresponding to the resource; wherein, the data communication module is further configured to: send a resource request carrying the priority of the resource to a web server and receive the resource from the web server.

根据本申请的第三方面,提供了一种web页面的传输与显示系统,其包括客户端和web服务器。所述客户端包括web页面显示装置,该web页面显示装置包括:数据通信模块,从所述web服务器获取所述web页面的源代码文件,其中,所述web页面中的资源预先配置有优先级;解析模块,解析所述源代码文件以从中提取出所述资源的优先级,并将提取出的资源的优先级发送到所述数据通信模块;以及显示模块,显示与从所述web服务器获取的资源对应的内容。所述数据通信模块进一步被配置为:将携带有所述资源的优先级的资源请求发送到所述web服务器以及从所述web服务器接收所述资源。所述web服务器中部署有所述web页面。According to a third aspect of the present application, a web page transmission and display system is provided, which includes a client and a web server. The client includes a web page display device, the web page display device includes: a data communication module, which obtains the source code file of the web page from the web server, wherein the resources in the web page are pre-configured with priority a parsing module, parsing the source code file to extract the priority of the resource, and sending the extracted resource priority to the data communication module; and a display module, displaying and obtaining from the web server The corresponding content of the resource. The data communication module is further configured to: send a resource request carrying the priority of the resource to the web server and receive the resource from the web server. The web page is deployed in the web server.

根据本申请的web页面传输方法,由最了解网站类型、页面特点,进而了解页面内资源的优先级的web页面开发者而非客户端(浏览器)在开发web页面的过程中根据实际需求预先配置web页面中各资源的优先级,因而如此开发的页面具有更符合web页面开发者需求的页面呈现效果。浏览器从web服务器获取到待访问的web页面的源代码文件后,通过对资源描述的解析,获取到不同资源的优先级,并可根据解析出的优先级属性,调整网页对象的后续请求操作方式(例如,调整并发度、前后次序或者填充优先级字段等)。随后,浏览器使用例如SPDY协议的现有设计将资源优先级连同对资源的请求一起发送到web服务器。web服务器接收到对资源的请求后,解析各资源的优先级,可以根据自身设置的优先级调度方案和服务器的负载、网络环境等状态进行综合考量,最终按照最为合适的资源优先级发送资源的响应,实现单TCP连接下的并发数据流的最优序列化调度。According to the web page transmission method of this application, the web page developer who knows the website type and page characteristics best, and then understands the priority of resources in the page, rather than the client (browser), pre-installs the web page according to actual needs in the process of developing web pages. The priority of each resource in the web page is configured, so that the page developed in this way has a page presentation effect more in line with the needs of web page developers. After the browser obtains the source code file of the web page to be accessed from the web server, it obtains the priority of different resources by analyzing the resource description, and can adjust the subsequent request operation of the web page object according to the parsed priority attribute way (for example, adjust the concurrency, front and back order, or populate the priority field, etc.). The browser then sends the resource priority along with the request for the resource to the web server using existing designs such as the SPDY protocol. After the web server receives the request for resources, it analyzes the priority of each resource, and can comprehensively consider according to the priority scheduling scheme set by itself, the load of the server, and the status of the network environment, and finally send the resource according to the most appropriate resource priority. Response, to achieve optimal serialization scheduling of concurrent data streams under a single TCP connection.

附图说明 Description of drawings

图1示出了根据本申请第一方面的web页面传输方法的流程图;Fig. 1 shows the flowchart of the web page transmission method according to the first aspect of the present application;

图2示出了根据本申请的第二方面的web页面显示装置的方框图。Fig. 2 shows a block diagram of a web page display device according to the second aspect of the present application.

具体实施方式 Detailed ways

下面将参照图1详细描述根据本申请的第一方面的web页面传输方法。The web page transmission method according to the first aspect of the present application will be described in detail below with reference to FIG. 1 .

如前所述,web页面中的全部内容并不需要同时呈现在用户面前。每个网页中都存在对用户体验起决定性作用的对象小集合。例如,用户比较关心的内容和用户使用度较高的内容需要优先呈现给用户,而对于用户而言相对不重要的内容和用户使用度较低的内容可以稍缓呈现给用户。As mentioned earlier, not all content in a web page needs to be presented to the user at the same time. Within each web page there exists a small collection of objects that are critical to the user experience. For example, the content that the user is more concerned about and the content that the user uses more frequently need to be presented to the user first, while the content that is relatively unimportant to the user and the content that the user uses less frequently can be presented to the user later.

为了实现这一点,根据本申请,由web页面的开发者在创建web页面时根据资源的重要性,为不同的内容预先配置优先级。作为一个具体示例,web页面的开发者可以以HTML(超文本标记语言)语言创建web页面,并在HTML文档的标签中添加自定义的属性,以表明与所述标签关联的资源的优先级。例如,可以在HTML文档的link或img等标签中添加一个自定义的属性priority,添加的方式例如如下所示:In order to achieve this, according to the present application, the developer of the web page pre-configures priorities for different contents according to the importance of resources when creating the web page. As a specific example, a web page developer may create a web page in HTML (Hypertext Markup Language) language, and add a custom attribute in a tag of the HTML document to indicate the priority of resources associated with the tag. For example, you can add a custom attribute priority to the link or img tags of the HTML document. The way to add it is as follows:

<link href="main.css"rel="stylesheet"type="text/css"priority="1″/><link href="main.css"rel="stylesheet"type="text/css"priority="1"/>

以上仅以HTML语言为例对创建web页面过程如何为页面中的不同内容预先配置优先级进行了示例性地说明。本领域技术人员可以理解的是,采用其它语言或方式来创建web页面并在创建过程中为页面中的不同内容预先配置优先级也是容易实现的,因而在此省略对相关内容的详细描述。The above only uses the HTML language as an example to illustrate how to pre-configure priorities for different contents in the web page during the process of creating a web page. Those skilled in the art can understand that it is also easy to use other languages or methods to create web pages and pre-configure priorities for different content in the page during the creation process, so detailed descriptions of related content are omitted here.

之后,web页面的开发者可以将创建好的web页面部署的web服务器上。Afterwards, the developer of the web page can deploy the created web page on the web server.

此后,当用户希望访问该web页面时,可以打开浏览器在地址栏中输入该web页面的URL。浏览器基于该URL向web服务器发送访问该web页面的请求。web服务器响应于浏览器的请求,将该web页面的源代码文件发送到浏览器。浏览器从web服务器获取所述web页面的源代码文件(图1中的步骤101)。例如,在所述web页面是以HTML语言创建的情况下,浏览器从web服务器获取的web页面的源代码文件为该web页面的HTML文档。Thereafter, when the user wishes to visit the web page, the browser can be opened to input the URL of the web page in the address bar. The browser sends a request for accessing the web page to the web server based on the URL. The web server sends the source code file of the web page to the browser in response to the browser's request. The browser obtains the source code file of the web page from the web server (step 101 in FIG. 1 ). For example, when the web page is created in HTML language, the source code file of the web page acquired by the browser from the web server is the HTML document of the web page.

接下来,浏览器对所获取的web页面的源代码文件进行解析,以从中提取出web页面中的资源的优先级(步骤102)。例如,参照如上所述的一个具体实施例,如果web页面的开发者以HTML语言创建web页面,并且在HTML文档的link标签中添加了一个自定义的属性priority,以表明相关内容的优先级,则浏览器对该web页面的HTML文档进行解析的过程中会将link标签、其属性以及各属性的值分离,从而提取出属性priority的值。Next, the browser parses the acquired source code file of the web page to extract the priority of resources in the web page (step 102 ). For example, referring to a specific embodiment as described above, if the developer of the web page creates the web page in HTML language, and adds a custom attribute priority in the link tag of the HTML document to indicate the priority of the relevant content, Then the browser will separate the link tag, its attributes and the values of each attribute during parsing the HTML document of the web page, so as to extract the value of the attribute priority.

然后,浏览器向web服务器发送资源请求,所述请求中携带有所述资源的优先级(步骤103)。Then, the browser sends a resource request to the web server, and the request carries the priority of the resource (step 103).

根据一个实施方案,浏览器可以以并发的数据帧的方式,即通过单TCP连接下的并发数据流,向web服务器发送所述资源请求。也就是说,浏览器在于web服务器建立了一个TCP连接之后,同时向web服务器发送多个资源请求。并且,所述数据帧中包含用于指示所述资源的优先级的字段,并且该字段的取值与从所述web页面的源代码文件中提取出的资源的优先级的值一致。例如,浏览器可以基于SPDY协议,通过向web服务器发送SYN_STREAM帧来请求所述资源,其中所述SYN_STREAM帧包括用于指示所述资源的优先级的Priority字段,所述Priority字段的取值与从所述web页面的源代码文件中提取出的资源的优先级的值一致。例如,如果web页面的开发者以HTML语言创建web页面,并且在HTML文档的link标签中添加了一个自定义的属性priority,以表明相关内容的优先级,那么SYN_STREAM帧的Priority字段的取值与link标签的属性priority的取值一致。According to an embodiment, the browser may send the resource request to the web server in the form of concurrent data frames, that is, through concurrent data streams under a single TCP connection. That is to say, after the browser establishes a TCP connection with the web server, it sends multiple resource requests to the web server at the same time. Moreover, the data frame includes a field for indicating the priority of the resource, and the value of this field is consistent with the value of the priority of the resource extracted from the source code file of the web page. For example, the browser can request the resource by sending a SYN_STREAM frame to the web server based on the SPDY protocol, wherein the SYN_STREAM frame includes a Priority field used to indicate the priority of the resource, and the value of the Priority field is the same as that from The values of the priorities of the resources extracted from the source code files of the web pages are consistent. For example, if the developer of the web page creates the web page in HTML language and adds a custom attribute priority in the link tag of the HTML document to indicate the priority of the relevant content, then the value of the Priority field of the SYN_STREAM frame is the same as The value of the attribute priority of the link tag is the same.

根据另一个实施方案,浏览器也可以以串行数据帧的方式向web服务器发送所述资源请求。也就是说,浏览器可以顺序地向web服务器发送多个资源请求。According to another embodiment, the browser may also send the resource request to the web server in the form of serial data frames. That is to say, the browser can send multiple resource requests to the web server sequentially.

之后,web服务器响应于浏览器的请求,按照所述资源的优先级次序向浏览器发送所述资源(步骤104)。Afterwards, the web server sends the resources to the browser according to the priority order of the resources in response to the browser's request (step 104).

例如,如果浏览器并发地向web服务器发送了5个资源请求,分别以SYN_STREAM(“GET”resource1[priority1])、SYN_STREAM(“GET”resource 2[priority2])、SYN_STREAM(“GET”resource3[priority3])、SYN_STREAM(“GET”resource 4[priority4])、SYN_STREAM(“GET”resource 5[priority5])表示。web服务器在收到请求SYN_STREAM(“GET”resource 1[priority1])后,很快对其进行了处理并向浏览器发送了相应的响应。而处理请求SYN_STREAM(“GET”resource2[priority2])需要花费较多的时间,而其余三个资源请求同时处于待处理队列中。此时web服务器会按照待处理队列中的三个请求的优先级的高低顺序来处理请求。例如,priority3、priority4、priority5的值分别为2、1、3,则web服务器在完成对请求SYN_STREAM(“GET”resource2[priority2])的处理之后会优先选择优先级最高的SYN_STREAM(“GET”resource4[priority4])进行处理。For example, if the browser sends 5 resource requests to the web server concurrently, the SYN_STREAM("GET" resource1[priority1]), SYN_STREAM("GET"resource 2[priority2]), SYN_STREAM("GET"resource3[priority3]) respectively ]), SYN_STREAM("GET" resource 4[priority4]), SYN_STREAM("GET"resource 5[priority5]) means. After receiving the request SYN_STREAM (“GET” resource 1[priority1]), the web server quickly processed it and sent a corresponding response to the browser. It takes more time to process the request SYN_STREAM ("GET" resource2[priority2]), and the remaining three resource requests are in the pending queue at the same time. At this time, the web server will process the requests according to the priority order of the three requests in the queue to be processed. For example, if the values of priority3, priority4, and priority5 are 2, 1, and 3 respectively, then the web server will preferentially select the SYN_STREAM ("GET" resource4 [priority4]) for processing.

图2示出了根据本申请的第二方面的web页面显示装置的方框图。如图2所示,web页面显示装置10包括数据通信模块201、解析模块202和显示模块203。Fig. 2 shows a block diagram of a web page display device according to the second aspect of the present application. As shown in FIG. 2 , the web page display device 10 includes a data communication module 201 , an analysis module 202 and a display module 203 .

当用户希望访问某个web页面时,可以打开浏览器在地址栏中输入该web页面的URL。数据通信模块201基于该URL向web服务器发送访问该web页面的请求。web服务器响应于数据通信模块201的请求,将该web页面的源代码文件发送到数据通信模块201。数据通信模块201从web服务器接收所述web页面的源代码文件,其中,所述web页面中的资源已由web页面开发者在创建该web页面时预先配置了优先级。作为一个具体示例,在所述web页面是以HTML语言创建的情况下,数据通信模块201从web服务器接收的web页面的源代码文件为该web页面的HTML文档。数据通信模块201从web服务器接收到web页面的源代码文件后将该源代码文件存储到客户端的存储器(例如内存,图中未示出)中,并将该源代码文件在存储器中的地址发送到解析模块202。When the user wishes to visit a certain web page, he can open a browser and input the URL of the web page in the address bar. The data communication module 201 sends a request for accessing the web page to the web server based on the URL. The web server sends the source code file of the web page to the data communication module 201 in response to the request of the data communication module 201 . The data communication module 201 receives the source code file of the web page from the web server, wherein the resources in the web page have been pre-configured with priorities by the web page developer when creating the web page. As a specific example, in the case that the web page is created in HTML language, the source code file of the web page received by the data communication module 201 from the web server is the HTML document of the web page. After the data communication module 201 receives the source code file of the web page from the web server, store the source code file in the memory of the client (such as memory, not shown in the figure), and send the address of the source code file in the memory to the parsing module 202 .

解析模块202从数据通信模块201所提供的地址处获取所述web页面的源代码文件并对其进行解析,以从中提取出所述资源的优先级,并将提取出的资源的优先级连同该资源的内容标识、存取位置等描述信息发送到数据通信模块201。例如,参照如上所述的一个具体实施例,如果web页面的开发者以HTML语言创建web页面,并且在HTML文档的link标签中添加了一个自定义的属性priority,以表明相关的资源的优先级,则解析模块202对该web页面的HTML文档进行解析的过程中会将link标签、其属性以及各属性的值分离,从而提取出属性priority的值,并将属性priority的值连同该资源的内容标识、存取位置等描述信息发送到数据通信模块201。The parsing module 202 obtains the source code file of the web page from the address provided by the data communication module 201 and parses it to extract the priority of the resource, and combines the extracted resource priority with the Descriptive information such as resource content identifiers and access locations are sent to the data communication module 201 . For example, referring to a specific embodiment as described above, if the developer of the web page creates the web page in HTML language, and adds a self-defined attribute priority in the link tag of the HTML document to indicate the priority of related resources , then the parsing module 202 will separate the link tag, its attributes, and the values of each attribute in the process of parsing the HTML document of the web page, thereby extracting the value of the attribute priority, and combining the value of the attribute priority together with the content of the resource Descriptive information such as identification and access location are sent to the data communication module 201 .

数据通信模块201将携带有所述资源的优先级的资源请求发送到web服务器以及从web服务器接收所述资源。例如,数据通信模块201可以基于SPDY协议,通过向web服务器发送SYN_STREAM帧来请求所述资源,其中所述SYN_STREAM帧包括用于指示所述资源的优先级的Priority字段,并且所述Priority字段的取值与从所述web页面的源代码文件中提取出的资源的优先级的值(例如上述link标签的属性priority的值)一致。作为对数据通信模块201所发送的SYN_STREAM帧的响应,web服务器可以通过SYN_REPLY帧将所请求的资源发送到数据通信模块201。数据通信模块201接收包含有所请求的资源的SYN_REPLY帧。数据通信模块201接收到所述资源后会向显示模块203发送消息,以激活显示模块203显示与从web服务器获取的资源对应的内容。The data communication module 201 sends the resource request carrying the priority of the resource to the web server and receives the resource from the web server. For example, the data communication module 201 may request the resource by sending a SYN_STREAM frame to the web server based on the SPDY protocol, wherein the SYN_STREAM frame includes a Priority field used to indicate the priority of the resource, and the value of the Priority field is The value is consistent with the priority value of the resource extracted from the source code file of the web page (for example, the value of the attribute priority of the above-mentioned link tag). As a response to the SYN_STREAM frame sent by the data communication module 201, the web server may send the requested resource to the data communication module 201 through a SYN_REPLY frame. The data communication module 201 receives a SYN_REPLY frame containing the requested resource. After receiving the resource, the data communication module 201 will send a message to the display module 203 to activate the display module 203 to display the content corresponding to the resource obtained from the web server.

根据本申请的第三方面,提供了一种web页面的传输与显示系统,其包括客户端和web服务器。所述客户端包括如上所述的web页面显示装置10。所述web服务器中部署有所述web页面。According to a third aspect of the present application, a web page transmission and display system is provided, which includes a client and a web server. The client includes the web page display device 10 as described above. The web page is deployed in the web server.

以上参照附图对本申请的示例性的实施方案进行了描述。本领域技术人员应该理解,上述实施方案仅仅是为了说明的目的而所举的示例,而不是用来进行限制。凡在本申请的教导和权利要求保护范围下所作的任何修改、等同替换等,均应包含在本申请要求保护的范围内。The exemplary embodiments of the present application are described above with reference to the accompanying drawings. Those skilled in the art should understand that the above-mentioned embodiments are only examples for the purpose of illustration, rather than limitation. Any modification, equivalent replacement, etc. made under the teaching of the present application and the protection scope of the claims shall be included in the protection scope of the present application.

Claims (12)

1. a web page transmission method, the resource in wherein said web page is provided with priority in advance, and described method comprises:
Browser obtains the source code file of described web page from web server;
Described in browser resolves, source code file is therefrom to extract the priority of described resource;
Browser sends resource request to web server, carries the priority of described resource in described request; And
Web server sends described resource according to the priority order of described resource to browser.
2. the method for claim 1, further comprises:
The priority of resource in pre-configured described web page when creating described web page, and the web page creating is deployed in web server.
3. method as claimed in claim 2, wherein, when creating described web page, in pre-configured described web page, the step of the priority of resource comprises: with html language, create described web page, and in the label of html document, add self-defining attribute, to show the priority of the resource associated with described label.
4. the method as described in any one in claim 1-3, wherein, the step that browser sends resource request to web server comprises: browser sends described resource request in the mode of concurrent Frame to web server, wherein said data frame packet is containing the field of priority that is used to indicate described resource, and the value of this field is consistent with the value of the priority of the resource extracting source code file from described web page.
5. method as claimed in claim 4, wherein, the step that browser sends resource request to web server comprises: browser is based on SPDY agreement, with SYN_STREAM frame, to web server, send described resource request, wherein said SYN_STREAM frame comprises the Priority field of the priority that is used to indicate described resource, and the value of described Priority field is consistent with the value of the priority of the resource extracting source code file from described web page.
6. a web page display unit, comprising:
Data communication module, obtains the source code file of described web page from web server, wherein, the resource in described web page is provided with priority in advance;
Parsing module, resolves described source code file therefrom to extract the priority of described resource, and the priority of the resource extracting is sent to described data communication module; And
Display module, shows the content corresponding with the resource of obtaining from web server;
Wherein, described data communication module is further configured to: the resource request that carries the priority of described resource is sent to web server and receives described resource from web server.
7. device as claimed in claim 6, wherein, described web page creates with html language, and in the label of created html document, comprises self-defining attribute, to show the priority of the resource associated with described label.
8. the device as described in claim 6 or 7, wherein, described data communication module is further configured to: the mode with concurrent Frame sends described resource request to web server, wherein said data frame packet is containing the field of priority that is used to indicate described resource, and the value of this field is consistent with the value of the priority of the resource extracting source code file from described web page.
9. device as claimed in claim 8, wherein, described data communication module is further configured to: based on SPDY agreement, with SYN_STREAM frame, to web server, send described resource request, wherein said SYN_STREAM frame comprises the Priority field of the priority that is used to indicate described resource, and the value of described Priority field is consistent with the value of the priority of the resource extracting source code file from described web page.
10. the transmission of web page and a display system, comprise client and web server, wherein,
Described client comprises web page display unit, and this web page display unit comprises:
Data communication module, obtains the source code file of described web page from described web server, wherein, the resource in described web page is provided with priority in advance;
Parsing module, resolves described source code file therefrom to extract the priority of described resource, and the priority of the resource extracting is sent to described data communication module; And
Display module, shows the content corresponding with the resource of obtaining from described web server;
Wherein, described data communication module is further configured to: the resource request that carries the priority of described resource is sent to described web server and receives described resource from described web server; And
In described web server, dispose and state to some extent web page.
11. devices as claimed in claim 10, wherein, described data communication module is further configured to: the mode with concurrent Frame sends described resource request to described web server, wherein said data frame packet is containing the field of priority that is used to indicate described resource, and the value of this field is consistent with the value of the priority of the resource extracting source code file from described web page.
12. devices as claimed in claim 11, wherein, described data communication module is further configured to: based on SPDY agreement, with SYN_STREAM frame, to described web server, send described resource request, wherein said SYN_STREAM frame comprises the Priority field of the priority that is used to indicate described resource, and the value of described Priority field is consistent with the value of the priority of the resource extracting source code file from described web page.
CN201210262011.8A 2012-07-26 2012-07-26 Web page transmission, web page display device and comprise the system of this device Active CN103581232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210262011.8A CN103581232B (en) 2012-07-26 2012-07-26 Web page transmission, web page display device and comprise the system of this device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210262011.8A CN103581232B (en) 2012-07-26 2012-07-26 Web page transmission, web page display device and comprise the system of this device

Publications (2)

Publication Number Publication Date
CN103581232A true CN103581232A (en) 2014-02-12
CN103581232B CN103581232B (en) 2016-12-21

Family

ID=50052156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210262011.8A Active CN103581232B (en) 2012-07-26 2012-07-26 Web page transmission, web page display device and comprise the system of this device

Country Status (1)

Country Link
CN (1) CN103581232B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392008A (en) * 2014-12-19 2015-03-04 北京奇虎科技有限公司 Webpage data acquisition method, browser client end and CDN (content distribution network) server
WO2016172910A1 (en) * 2015-04-30 2016-11-03 深圳市星电商科技有限公司 Method and device for generating electronic transaction certificate page, and storage medium
CN106156054A (en) * 2015-03-27 2016-11-23 阿里巴巴集团控股有限公司 A kind of method and apparatus loading page module
CN108073580A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 A kind of processing method and processing device based on page concurrent request
CN109510850A (en) * 2017-09-14 2019-03-22 广州市动景计算机科技有限公司 The processing method of browse request, apparatus and system
CN111988389A (en) * 2020-08-13 2020-11-24 暨南大学 Request scheduling mechanism of server based on HTTP/3 protocol
CN113157342A (en) * 2021-04-27 2021-07-23 思享智汇(海南)科技有限责任公司 Method, system and storage medium for displaying background content of client
CN113298112A (en) * 2021-04-01 2021-08-24 安徽继远软件有限公司 Integrated data intelligent labeling method and system
CN113590410A (en) * 2021-06-20 2021-11-02 济南浪潮数据技术有限公司 Resource request method, system, device and medium
WO2024183425A1 (en) * 2023-12-13 2024-09-12 天翼云科技有限公司 Browser rendering method, apparatus and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101082917A (en) * 2006-06-02 2007-12-05 千橡世纪科技发展(北京)有限公司 Method and apparatus for rapid previewing summary of web page content
CN101226525A (en) * 2007-01-19 2008-07-23 国际商业机器公司 Method, server, client terminal and system for controlling download and display of web page layout

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101082917A (en) * 2006-06-02 2007-12-05 千橡世纪科技发展(北京)有限公司 Method and apparatus for rapid previewing summary of web page content
CN101226525A (en) * 2007-01-19 2008-07-23 国际商业机器公司 Method, server, client terminal and system for controlling download and display of web page layout
US20090013034A1 (en) * 2007-01-19 2009-01-08 International Business Machines Corporation Method, server, client and system for controlling download and display of web pages

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392008B (en) * 2014-12-19 2017-12-05 北京奇虎科技有限公司 Web data acquisition methods, browser client and CDN server
CN104392008A (en) * 2014-12-19 2015-03-04 北京奇虎科技有限公司 Webpage data acquisition method, browser client end and CDN (content distribution network) server
CN106156054B (en) * 2015-03-27 2019-08-30 阿里巴巴集团控股有限公司 A kind of method and apparatus of loading page module
CN106156054A (en) * 2015-03-27 2016-11-23 阿里巴巴集团控股有限公司 A kind of method and apparatus loading page module
WO2016172910A1 (en) * 2015-04-30 2016-11-03 深圳市星电商科技有限公司 Method and device for generating electronic transaction certificate page, and storage medium
CN106462857A (en) * 2015-04-30 2017-02-22 深圳市星电商科技有限公司 Method and device for generating electronic transaction certificate page, and storage medium
CN108073580A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 A kind of processing method and processing device based on page concurrent request
CN109510850A (en) * 2017-09-14 2019-03-22 广州市动景计算机科技有限公司 The processing method of browse request, apparatus and system
CN111988389A (en) * 2020-08-13 2020-11-24 暨南大学 Request scheduling mechanism of server based on HTTP/3 protocol
CN111988389B (en) * 2020-08-13 2023-03-24 暨南大学 Request scheduling mechanism of server based on HTTP/3 protocol
CN113298112A (en) * 2021-04-01 2021-08-24 安徽继远软件有限公司 Integrated data intelligent labeling method and system
CN113157342A (en) * 2021-04-27 2021-07-23 思享智汇(海南)科技有限责任公司 Method, system and storage medium for displaying background content of client
CN113590410A (en) * 2021-06-20 2021-11-02 济南浪潮数据技术有限公司 Resource request method, system, device and medium
CN113590410B (en) * 2021-06-20 2023-12-22 济南浪潮数据技术有限公司 Resource request method, system, equipment and medium
WO2024183425A1 (en) * 2023-12-13 2024-09-12 天翼云科技有限公司 Browser rendering method, apparatus and system

Also Published As

Publication number Publication date
CN103581232B (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN103581232B (en) Web page transmission, web page display device and comprise the system of this device
CN104021172B (en) Advertisement filter method and advertisement filter device
US9495471B2 (en) Optimize view elements sizes to maximize most data viewed in a multiple view elements GUI
US10346502B2 (en) Mobile enablement of existing web sites
CN102436455B (en) Realize method, system and client browser that word browses
US10120847B2 (en) Methods for transforming requests for web content and devices thereof
CN104217037B (en) A kind of method and device for showing webpage in the terminal
CN102663126A (en) Method and device for displaying webpage in mobile terminal
CN103092941B (en) The method and apparatus presenting content on an electronic device
CN103500194A (en) Method, device and browser for loading webpage
CN103605688A (en) Intercept method and intercept device for homepage advertisements and browser
US9143378B2 (en) Rendering components within different browser environments
CN108416021B (en) Browser webpage content processing method and device, electronic equipment and readable medium
CN102737067A (en) Method and system for outputting webpage
EP2778976A1 (en) Methods for processing cascading style sheets and devices thereof
TW201409273A (en) Method and device for responding to webpage access request
CN104317570B (en) The apparatus and method of dynamic analysis Web applications
CN113220273A (en) Micro front-end application resource processing method, device, equipment and medium
CN111708962A (en) Rendering method, device, device and storage medium for skeleton screen
CN103024010A (en) File display device and method
CN104156421B (en) The page shows method, apparatus and system
JP5151696B2 (en) Program to rewrite uniform resource locator information
CN107229653A (en) Pseudo- static Web page generation method and device
JP2009031960A (en) Technology for relaying communication between client device and server device
JP5774429B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant