WO2016112826A1 - 一种提高页面加载速度的方法及系统 - Google Patents

一种提高页面加载速度的方法及系统 Download PDF

Info

Publication number
WO2016112826A1
WO2016112826A1 PCT/CN2016/070400 CN2016070400W WO2016112826A1 WO 2016112826 A1 WO2016112826 A1 WO 2016112826A1 CN 2016070400 W CN2016070400 W CN 2016070400W WO 2016112826 A1 WO2016112826 A1 WO 2016112826A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
rendered
module
request
server
Prior art date
Application number
PCT/CN2016/070400
Other languages
English (en)
French (fr)
Inventor
雷宁
Original Assignee
北京京东尚科信息技术有限公司
北京京东世纪贸易有限公司
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 北京京东尚科信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京京东尚科信息技术有限公司
Priority to US15/542,084 priority Critical patent/US10762159B2/en
Priority to RU2017128099A priority patent/RU2691838C2/ru
Priority to JP2017536841A priority patent/JP6428944B2/ja
Publication of WO2016112826A1 publication Critical patent/WO2016112826A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the embodiments of the present invention relate to the field of Internet technologies, and in particular, to a method and system for improving page loading speed.
  • the HTML (HyperText Mark-up Language) page accessed by the user may not change for a long time, so the page staticization technology can be used to process the page and speed up the loading of the webpage.
  • the page staticization technology can be used to process the page and speed up the loading of the webpage.
  • the page staticization technology caches the dynamically rendered page of the application server to the hard disk of the Web server.
  • the page cached directly on the hard disk does not need to be rendered by the application server.
  • Step S101 the CDN (Content Delivery Network) cluster receives the access page request sent by the user;
  • Step S102 the CDN cluster determines whether a page corresponding to the access page request is cached; if yes, step S108 is performed; if not, step S103 is performed;
  • Step S103 the CDN cluster forwards the access page request to the web server
  • Step S104 the web server receives the access page request, determines whether the page corresponding to the access page request is cached in the hard disk; if yes, step S108 is performed; if not, step S105 is performed;
  • Step S105 the web server forwards the access page request to the application server, and the application server performs multi-thread rendering on the page corresponding to the access page request, and returns the rendered page to the web server;
  • Step S106 the web server caches the rendered page to the hard disk, and after rendering The page is sent to the CDN cluster;
  • Step S107 the CDN cluster receives the rendered page and caches it
  • step S108 the CDN cluster returns the rendered page to the browser, and the browser parses the rendered page.
  • the application server renders the entire page through the thread pool.
  • the rendering task that is not allocated to the thread resource may be blocked, causing the page to fail to load or the loading time to expire, and the user experience Very poor.
  • the embodiment of the invention provides a method and a system for improving the page loading speed, so as to implement asynchronous rendering of the page frame and the page module, and reduce the loading time of the page.
  • an embodiment of the present invention provides a method for improving page loading speed, including:
  • the content distribution network receives the page frame request sent by the browser, and initiates a page frame request to the server;
  • the browser parses the rendered page frame to obtain a page module identifier, and initiates, by the content distribution network, a page module request including the page module identifier to the server;
  • the content distribution network fills the rendered page module into the rendered page frame to form a page according to the page module identifier, and sends the page to the browser.
  • the content distribution network receives a page frame request sent by the browser, and the requesting the page frame request to the server specifically includes:
  • the content distribution network receives the page frame request, determines whether the rendered page frame is cached, and if not, sends a page frame request to the server.
  • the server sends the rendered page frame to the browser through the content distribution network according to the page frame request, and the method includes:
  • the application server renders a page frame, and sends the rendered page frame to the internet server;
  • the Internet server receives the rendered page frame, caches the rendered page frame in memory, and sends the rendered page frame to the browser through the content distribution network.
  • the sending, by the content distribution frame, to the browser by using the content distribution network comprises:
  • the requesting, by the content distribution network, the page module request that includes the identifier of the page module to the server specifically includes:
  • the browser sends the page module request to the content distribution network
  • the content distribution network receives the page module request and determines whether the rendered page module is cached, and if not, sends the page module request to the server.
  • the server sends a rendered page module to the content distribution network according to the page module request, and the method includes:
  • the application server renders a page module, caches the rendered page module in a memory, and sends the rendered page module to the Internet server;
  • the Internet server receives the rendered page module, caches the rendered page module in memory, and sends the rendered page module to the content distribution network.
  • the content distribution network populates the rendered page module into the rendered page frame to form a page, and sends the page to the browser, which specifically includes:
  • the content distribution network determines whether the server renders the page process timeout. If the timeout period has not expired, the rendered page module is filled into the rendered page frame to form a page, and the page is sent to the browser.
  • an embodiment of the present invention provides a system for improving a page loading speed, including: a content distribution network, a server, and a browser;
  • the content distribution network is configured to receive a page frame request sent by a browser, and initiate a page frame request to the server;
  • the server is configured to: according to the page frame request, render a page frame, and send the rendered page frame to the browser through the content distribution network;
  • the browser is configured to parse the rendered page frame to obtain a page module identifier, and initiate, by the content distribution network, a page module request including the page module identifier to the server;
  • the server is configured to: according to the page module request, render a page module, and send the rendered page module to the content distribution network;
  • the content distribution network is configured to fill the rendered page module into the rendered page frame to form a page according to the page module identifier, and send the page to the browser.
  • the content distribution network is specifically configured to: receive the page frame request, determine whether the rendered page frame is cached, and if not, send a page frame request to the server;
  • the server comprises an internet server and an application server;
  • An internet server configured to receive the page frame request sent by the content distribution network, determine whether the rendered page frame is cached, and if not, send the page frame request to an application server;
  • the application server is configured to render a page frame according to the page frame request, and send the rendered page frame to the internet server;
  • the Internet server is configured to receive the rendered page frame, cache the rendered page frame in a memory, and send the rendered page frame to the browser through the content distribution network.
  • the content distribution network is specifically configured to: receive the rendered page frame sent by the Internet server, cache the rendered page frame, and send the rendered page frame to the browser .
  • the browser is configured to send the page module request to the content distribution network
  • the content distribution network is specifically configured to receive the page module request, and determine whether the rendered page module is cached, and if not, send the page module request to the server.
  • the Internet server is configured to receive the page module request, determine whether the rendered page frame request needs to be cached, and if not, to the application service Sending the page module request; if the cache is needed, determining whether the rendered page module is cached, and if not, sending the page module request to the application server;
  • the application server is configured to: according to the page module request, render a page module, cache the rendered page module in a memory, and send the rendered page module to the Internet server;
  • the Internet server is configured to receive the rendered page module, cache the rendered page module in a memory, and send the rendered page module to the content distribution network.
  • the content distribution network is specifically configured to determine whether the server rendering page process times out. If the timeout period is not timed, the rendered page module is filled into the rendered page frame to form a page, and the page is Sent to the browser.
  • the embodiment of the invention provides a method and a system for improving the page loading speed.
  • the method for improving the page loading speed is provided by the embodiment of the invention, and the page rendering request is dispersed by asynchronously rendering the page frame and the page module. Speed up module rendering and increase page load speed.
  • FIG. 1 is a schematic flowchart of a user accessing a page in the prior art
  • FIG. 2 is a schematic flowchart of a method for improving page loading speed according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart diagram of a method for improving page loading speed according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a system for improving page loading speed according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of application deployment of a system for improving page loading speed according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of application deployment of a system for improving page loading speed according to an embodiment of the present invention.
  • the method for improving the page loading speed is provided by the embodiment of the present invention.
  • the method is applicable to the case of loading a page. As shown in FIG. 2, the method specifically includes:
  • Step S201 The content distribution network receives a page frame request sent by the browser, and initiates a page frame request to the server.
  • a webpage development technology for creating an interactive webpage application based on Ajax can implement asynchronous update of the page. That is, the page frame can be rendered first, then the page module is rendered, and the rendered page frame and the rendered page module are combined into a page.
  • a Content Delivery Network can receive a page frame request sent by a browser. The content distribution network can determine whether the cached page frame is cached.
  • the rendered page frame can be directly sent to the browser to implement a quick response to the page frame request, thereby improving the page loading speed; If the rendered page frame is not cached, a page frame request can be initiated to the server to obtain the rendered page frame.
  • Step S202 The server renders the page frame according to the page frame request, and sends the rendered page frame to the browser through the content distribution network.
  • Step S202 the server receives the page frame request sent by the content distribution network, and can determine whether the rendered page frame is cached in the local Redis (distributed storage system) cluster, and if so, the cached rendered page frame can pass the content.
  • the distribution network sends to the browser; if not, the page frame can be rendered, and the rendered page frame is sent to the browser through the content distribution network.
  • the rendered page frame can be cached to the local Redis cluster.
  • the rendered page is cached to the hard disk, and the rendered page frame is cached to the local Redis cluster, which improves the access speed, is easy to maintain, and can dynamically delete the cached content in the server according to the business needs, and ensures the front end. Browse real-time and data consistency to save storage space.
  • the rendered page frame looks like this:
  • Step S203 The browser parses the rendered page frame to obtain a page module identifier, and initiates a page module request including the page module identifier to the server through the content distribution network.
  • the rendered page frame may be a page frame having a DOM (Document Object Model) structure.
  • Browser can take advantage of The JavaScript engine parses the rendered page frame to get the page module identifier.
  • the page module identifier can identify the location of the page module in the page frame, and is the basis for populating the page module into the page frame.
  • the browser can send the same number of page module requests depending on the number of page modules.
  • Step S204 The server renders the page module according to the page module request, and sends the rendered page module to the content distribution network.
  • the server receives the page module request sent by the content distribution network, and can determine whether the rendered page module is cached in the local Redis cluster, and if so, the cached rendered page module can be sent to the content distribution network to the content distribution network. Browser; if not, the page module can be rendered, and the rendered page module is sent to the browser through the content distribution network. Also, the rendered page module can be cached to the local Redis cluster.
  • Step S205 The content distribution network fills the rendered page module into the rendered page frame to form a page frame according to the page module identifier, and sends the page to the browser.
  • step S205 the content distribution network fills the rendered page module into a page of the rendered page frame to form a JSON (JavaScript Object Notation, lightweight data exchange format) structure according to the page module identifier.
  • JSON JavaScript Object Notation, lightweight data exchange format
  • JSON structure example is as follows:
  • moduleInstanceId "10001" / / module identification, used to find the location of the module in the page
  • the method for improving the page loading speed provided by the embodiment of the present invention, by asynchronously rendering the page frame and the page module, dispersing the page rendering request, speeding up the module rendering speed, and improving the page loading speed.
  • a method for improving page loading speed is provided by an embodiment of the present invention.
  • the method is applicable to a server that loads a page, and the method is based on a server including a web server and an application server, as shown in FIG. include:
  • Step S301 the content distribution network (CDN) receives the page frame request.
  • step S302 the content distribution network determines whether the page frame is cached. If not, step S303 is performed; if yes, step S308 is performed.
  • Step S303 the content distribution network sends a page frame request to the Internet, and the Internet (Web) server receives the page frame request sent by the content distribution network.
  • the Internet server is preferably Nginx (a lightweight web server/reverse proxy server and an email proxy server).
  • Nginx accepts the page frame request, if the page frame request meets the Nginx matching rule, then Step S304 is performed.
  • Step S304 the Internet server determines whether the rendered page frame is cached, and if so, proceeds to step S308; if not, executes step S305.
  • the Internet server may determine whether the rendered page frame is cached in the Lua scripting language.
  • Step S305 the Internet server sends the page frame request to the application server, and the application server requests the page frame according to the page frame request, and sends the rendered page frame to the Internet server.
  • the application server may be an instance of Tomcat (a free open source web application server).
  • Step S306 the Internet server receives the rendered page frame, caches the rendered page frame in the memory, and sends the rendered page frame to the content distribution network.
  • Step S307 the content distribution network receives the rendered page frame, and caches the rendered page frame in the memory.
  • Step S308 the rendered page frame is sent to the browser.
  • Step S309 the browser parses the rendered page frame to obtain a page module identifier, and the browser sends a page module request to the content distribution network.
  • Step S310 the content distribution network receives the page module request, and determines whether the rendered page module is cached. If yes, step 318 is performed; if not, step S311 is performed.
  • step S311 the content distribution network sends a request for the page module to the internet server.
  • step S312 the Internet server receives the page module request, and determines whether the rendered page frame request needs to be cached. If the cache is not required, step S314 is performed; if the cache is required, step S313 is performed.
  • step S312 part of the page module needs real-time rendering, such as a search module, the search module does not need to be cached; some page modules do not need real-time rendering, such as a date module, then the date module does not need to be cached.
  • real-time rendering such as a search module
  • the search module does not need to be cached
  • some page modules do not need real-time rendering, such as a date module, then the date module does not need to be cached.
  • step S313 the Internet server determines whether the rendered page module is cached. If the rendered page module is cached, the rendered page module is sent to the content distribution network; if not, step S314 is performed.
  • Step S314 the Internet server sends the page module request to the application server, and the application server renders the page module according to the request of the page module, and caches the rendered page module in the memory.
  • Step S316 the Internet server receives the rendered page module, caches the rendered page module in the memory, and sends the rendered page module to the content distribution network.
  • Step S317 the content distribution network determines whether the server renders the page process timeout. If it does not time out, step S318 is performed; if it times out, the page module request is ended.
  • Step S318, the rendered page module is filled into the rendered page frame to form a page frame, and the page is sent to the browser.
  • the method for improving the page loading speed provided by the embodiment of the present invention, by asynchronously rendering the page frame and the page module, dispersing the page rendering request, speeding up the module rendering speed, and improving the page loading speed.
  • An embodiment of the present invention provides a system for improving page loading speed.
  • the system includes a content distribution network 41, a server 42, and a browser 43.
  • the content distribution network 41 is configured to receive a page frame request sent by the browser 43 and initiate a page frame request to the server 42.
  • the server 42 is configured to render the page frame according to the page frame request, and distribute the rendered page frame through the content.
  • the network 41 is sent to the browser 43; the browser 43 is configured to parse the rendered page frame to obtain the page module identifier, and initiate a page module request including the page module identifier to the server 42 through the content distribution network 41; then the server 42, For rendering the page module according to the page module request, sending the rendered page module to the content distribution network 41; the content distribution network 41, for According to the page module identifier, the rendered page module is filled into the rendered page frame to form a page frame, and the page is sent to the browser 43.
  • a Content Delivery Network can receive a page frame request sent by a browser.
  • the content distribution network can determine whether the page frame corresponding to the page frame request is cached. If the page frame corresponding to the page frame request is cached, the page frame can be directly sent to the browser to implement a quick response to the page frame request, thereby improving the page loading speed. If the page frame corresponding to the page frame request is not cached, a page frame request may be initiated to the server to obtain a page frame after the server renders.
  • the server 42 can receive the page frame request sent by the content distribution network, and can determine whether the rendered page frame is cached in the local Redis cluster, and if so, the cached rendered page frame can be sent to the browsing through the content distribution network. If not, the page frame can be rendered and the rendered page frame sent to the browser over the content distribution network. Also, the rendered page frame can be cached to the local Redis cluster. Compared with the prior art, the rendered page is cached to the hard disk, the access speed is improved, the maintenance is easy, and the cached content dynamically deleted according to the business needs in the application server is ensured, and the front-end browsing real-time and data consistency are ensured, thereby saving storage space. .
  • the rendered page frame may be a page frame having a DOM (Document Object Model) structure.
  • the browser can use the JavaScript engine to parse the rendered page frame to get the page module identifier.
  • the page module identifier can identify the location of the page module in the page frame, and is the basis for populating the page module into the page frame.
  • the browser can send the same number of page module requests depending on the number of page modules.
  • the page module request sent by the content distribution network may also be received, and it may be determined whether the rendered page module is cached in the local Redis cluster, and if so, the cached rendered page module may be sent through the content distribution network. To the browser; if not, the page module can be rendered, and the rendered page module is sent to the browser through the content distribution network. Also, the rendered page module can be cached to the local Redis cluster.
  • the rendered page module may be filled into a page of the rendered page frame to form a JSON (JavaScript Object Notation) structure according to the page module identifier.
  • JSON JavaScript Object Notation
  • the method for improving the page loading speed provided by the embodiment of the present invention, by asynchronously rendering the page frame and the page module, dispersing the page rendering request, speeding up the module rendering speed, and improving the page loading speed.
  • the embodiment of the present invention provides a system for improving the page loading speed.
  • the application server includes an Internet server and an application server.
  • the system includes: a content distribution network 61, an Internet server 62, The application server 63 and the browser 64.
  • the content distribution network 61 is specifically configured to receive a page frame request, determine whether a page frame is cached, and if not, send a page frame request to the server; if yes, send the page frame to the browser 64.
  • the Internet server 62 is configured to receive a page frame request sent by the content distribution network 61, determine whether the rendered page frame is cached, and if yes, send the rendered page frame to the browser 64; if not, the page frame request Send to the application server 63;
  • An application server 63 configured to render a page frame according to a page frame request, and send the rendered page frame to the Internet server 62;
  • the Internet server 62 is configured to receive the rendered page frame, cache the rendered page frame in memory, and send the rendered page frame to the content distribution network 61 through the content distribution network 61.
  • the content distribution network 61 is specifically configured to receive the rendered page frame, cache the rendered page frame in the memory, and send the rendered page frame to the browser 64.
  • a browser 64 configured to send a page module request to the content distribution network 61;
  • the content distribution network 61 is specifically configured to receive a page module request, and determine whether the rendered page module is cached, and if yes, send the rendered page module to the browser 64; if not, send the page module request to server.
  • the Internet server 62 is configured to receive a page module request, determine whether the rendered page frame request needs to be cached, and if the cache is not needed, send a page module request to the application server 63; if the cache is needed, determine whether the rendered page is cached. Module, if the rendered page module is cached, send the rendered page module to the application server 63; if not, send the page module request to the application server 63;
  • the application server 63 is configured to: according to the page module request, render the page module, cache the rendered page module in the memory, and send the rendered page module to the Internet server 62;
  • the Internet server 62 is configured to receive the rendered page module, cache the rendered page module in memory, and send the rendered page module to the content distribution network 61.
  • the content distribution network 61 is specifically configured to determine whether the server renders the page process timeout. If the timeout period has not expired, the rendered page module is filled into the rendered page frame to form a page frame, and the page is sent to the browser 64; Then the page module request is ended.
  • the method for improving the page loading speed provided by the embodiment of the present invention, by asynchronously rendering the page frame and the page module, dispersing the page rendering request, speeding up the module rendering speed, and improving the page loading speed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种提高页面加载速度的方法及系统,所述方法包括:内容分发网络接收浏览器发送的页面框架请求,向服务器发起页面框架请求(S201);服务器依据页面框架请求,渲染页面框架,将渲染后的页面框架通过内容分发网络发送至浏览器(S202);浏览器解析渲染后的页面框架,以获得页面模块标识,并通过内容分发网络向服务器发起包含页面模块标识的页面模块请求(S203);服务器依据页面模块请求,渲染页面模块,将渲染后的页面模块发送至内容分发网络(S204);内容分发网络依据页面模块标以,将渲染后的页面模块填充到渲染后的页面框架中形成页面,将页面发送至浏览器(S205)。通过上述方法及系统,实现了对页面框架和页面模块的异步渲染,提高了网页加载速度。

Description

一种提高页面加载速度的方法及系统 技术领域
本发明实施例涉及互联网技术领域,尤其涉及一种提高页面加载速度的方法及系统。
背景技术
当前的网络环境中,用户访问的HTML(HyperText Mark-up Language,超文本标记语言)页面可能在长时间内没有变化,因此可以使用页面静态化技术处理页面,提高网页加载的速度。
页面静态化技术是将应用服务器动态渲染后的页面缓存到Web(互联网)服务器的硬盘上,当用户请求访问页面时,直接读取硬盘中缓存的页面,不需要再经过应用服务器渲染。
目前,基于页面静态化技术,用户访问页面的主要过程如图1所示:
步骤S101,CDN(Content Delivery Network,内容分发网络)集群接收用户发送的访问页面请求;
步骤S102,CDN集群判断是否缓存有与访问页面请求相对应的页面;若有,则执行步骤S108;若无,则执行步骤S103;
步骤S103,CDN集群将访问页面请求转发到Web服务器;
步骤S104,Web服务器接收访问页面请求,判断硬盘中是否缓存有与访问页面请求相对应的页面;若有,则执行步骤S108;若无,则执行步骤S105;
步骤S105,Web服务器将访问页面请求转发给应用服务器,应用服务器对与访问页面请求相对应的页面进行多线程渲染,向Web服务器返回渲染后的页面;
步骤S106,Web服务器将渲染后的页面缓存到硬盘,并将渲染后 的页面发送至CDN集群;
步骤S107,CDN集群接收渲染后的页面,并缓存;
步骤S108,CDN集群返回渲染后的页面至浏览器,浏览器解析渲染后的页面。
其中,目前应用服务器是通过线程池进行对整个页面进行渲染,但是访问页面请求量超过线程池最大值时,没有分配到线程资源的渲染任务会阻塞,造成页面不能加载或者加载时间超时,用户体验极差。
发明内容
本发明实施例提供一种提高页面加载速度的方法及系统,以实现对页面框架和页面模块进行异步渲染,降低了页面的加载时间。
一方面,本发明实施例提供了一种提高页面加载速度的方法,包括:
内容分发网络接收浏览器发送的页面框架请求,向服务器发起页面框架请求;
所述服务器依据所述页面框架请求,渲染页面框架,将渲染后的页面框架通过所述内容分发网络发送至所述浏览器;
所述浏览器解析所述渲染后的页面框架,以获得页面模块标识,并通过所述内容分发网络向所述服务器发起包含所述页面模块标识的页面模块请求;
所述服务器依据所述页面模块请求,渲染页面模块,将渲染后的页面模块发送至所述内容分发网络;
所述内容分发网络依据所述页面模块标识,将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
优选地,所述内容分发网络接收浏览器发送的页面框架请求,向服务器发起页面框架请求具体包括:
所述内容分发网络接收所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则向所述服务器发送页面框架请求。
优选地,所述服务器依据所述页面框架请求,渲染页面框架,将渲染后的页面框架通过所述内容分发网络发送至所述浏览器,具体包括:
互联网服务器接收所述内容分发网络发送的所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则将所述页面框架请求发送至应用服务器;
所述应用服务器,依据所述页面框架请求,渲染页面框架,并将所述渲染后的页面框架发送至所述互联网服务器;
所述互联网服务器接收所述渲染后的页面框架,在内存中缓存所述渲染后的页面框架,并将所述渲染后的页面框架通过所述内容分发网络发送至所述浏览器。
优选地,所述并将所述渲染后的页面框架通过所述内容分发网络发送至所述浏览器包括:
所述互联网服务器向所述内容分发网络发送所述渲染后的页面框架,所述内容分发网络接收所述渲染后的页面框架,缓存所述渲染后的页面框架,并向所述浏览器发送所述渲染后的页面框架。
优选地,所述并通过所述内容分发网络向所述服务器发起包含所述页面模块标识的页面模块请求,具体包括:
所述浏览器向所述内容分发网络发送所述页面模块请求;
所述内容分发网络接收所述页面模块请求,并判断是否缓存有渲染后的页面模块,若无,则向将所述页面模块请求发送至所述服务器。
优选地,所述服务器依据所述页面模块请求,渲染页面模块,将渲染后的页面模块发送至所述内容分发网络,具体包括:
互联网服务器接收所述页面模块请求,判断所述渲染后的页面框架请求是否需要缓存,若不需要缓存,则向应用服务器发送所述页面模块请求;若需要缓存,则判断是否缓存有所述渲染后的页面模块,若无,则将所述页面模块请求发送至所述应用服务器;
所述应用服务器,依据所述页面模块请求,渲染页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述互联网服务器;
所述互联网服务器接收所述渲染后的页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述内容分发网络。
优选地,所述内容分发网络依据所述页面模块标识,将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器,具体包括:
所述内容分发网络判断所述服务器渲染页面过程是否超时,若未超时,则将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
另一方面,本发明实施例提供了一种提高页面加载速度的系统,包括:内容分发网络、服务器和浏览器;
所述内容分发网络,用于接收浏览器发送的页面框架请求,向服务器发起页面框架请求;
所述服务器,用于依据所述页面框架请求,渲染页面框架,将渲染后的页面框架通过所述内容分发网络发送至所述浏览器;
所述浏览器,用于解析所述渲染后的页面框架,以获得页面模块标识,并通过所述内容分发网络向所述服务器发起包含所述页面模块标识的页面模块请求;则
所述服务器,用于依据所述页面模块请求,渲染页面模块,将渲染后的页面模块发送至所述内容分发网络;
所述内容分发网络,用于依据所述页面模块标识,将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
优选地,所述内容分发网络具体用于,接收所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则向所述服务器发送页面框架请求;。
优选地,所述服务器包括互联网服务器和应用服务器;
互联网服务器,用于接收所述内容分发网络发送的所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则将所述页面框架请求发送至应用服务器;
所述应用服务器,用于依据所述页面框架请求,渲染页面框架,并将所述渲染后的页面框架发送至所述互联网服务器;则
所述互联网服务器,用于接收所述渲染后的页面框架,在内存中缓存所述渲染后的页面框架,并将所述渲染后的页面框架通过所述内容分发网络发送至所述浏览器。
优选地,所述内容分发网络具体用于,接收所述互联网服务器发送的所述渲染后的页面框架,缓存所述渲染后的页面框架,并向所述浏览器发送所述渲染后的页面框架。
优选地,所述浏览器,用于向所述内容分发网络发送所述页面模块请求;则
所述内容分发网络,具体用于接收所述页面模块请求,并判断是否缓存有渲染后的页面模块,若无,则向将所述页面模块请求发送至所述服务器。
优选地,互联网服务器,用于接收所述页面模块请求,判断所述渲染后的页面框架请求是否需要缓存,若不需要缓存,则向应用服务 器发送所述页面模块请求;若需要缓存,则判断是否缓存有所述渲染后的页面模块,若无,则将所述页面模块请求发送至所述应用服务器;
所述应用服务器,用于依据所述页面模块请求,渲染页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述互联网服务器;则
所述互联网服务器,用于接收所述渲染后的页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述内容分发网络。
优选地,所述内容分发网络,具体用于判断所述服务器渲染页面过程是否超时,若未超时,则将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
本发明实施例提供了一种提高页面加载速度的方法及系统,通过本发明实施例提供的一种提高页面加载速度的方法,通过对页面框架和页面模块进行异步化渲染,分散页面渲染请求,加快模块渲染的速度,提高页面加载速度。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中用户访问页面的流程示意图;
图2为本发明实施例提供的一种提高页面加载速度的方法的流程示意图;
图3为本发明实施例提供的一种提高页面加载速度的方法的流程示意图;
图4为本发明实施例提供的一种提高页面加载速度的系统的结构示意图;
图5为本发明实施例提供的一种提高页面加载速度的系统的应用部署示意图;
图6为本发明实施例提供的一种提高页面加载速度的系统的应用部署示意图。
具体实施方式
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。
实施例一
本发明实施例提供的一种提高页面加载速度的方法,该方法可适用于加载页面的情况下,如图2所示,该方法具体包括:
步骤S201,内容分发网络接收浏览器发送的页面框架请求,向服务器发起页面框架请求。
在步骤S201中,基于Ajax(Asynchronous JavaScript And XML,异步JavaScript和XML)创建交互式网页应用的网页开发技术,可以实现页面异步更新。即可以先渲染页面框架,然后渲染页面模块,将渲染后的页面框架和渲染后的页面模块组合成页面。从而,内容分发网络(CDN,Content Delivery Network)可以接收浏览器发送的页面框架请求。内容分发网络可以判断是否缓存有与渲染后的页面框架,若缓存有渲染后的页面框架,则可以直接向浏览器发送渲染后的页面框架,实现快速响应页面框架请求,提高页面加载速度;若未缓存渲染后的页面框架,则可以向服务器发起页面框架请求,以获得渲染后的页面框架。
步骤S202,服务器依据页面框架请求,渲染页面框架,将渲染后的页面框架通过内容分发网络发送至浏览器。
步骤S202,服务器接收内容分发网络发送的页面框架请求,可以判断本地Redis(分布式存储系统)集群中是否缓存有渲染后的页面框架,若有,则可以将缓存的渲染后的页面框架通过内容分发网络发送至浏览器;若无,则可以渲染页面框架,将渲染后的页面框架通过内容分发网络发送至浏览器。并且,可以将渲染后的页面框架缓存至本地Redis集群。相对于现有技术中将渲染后的页面缓存至硬盘,将渲染后的页面框架缓存至本地Redis集群,提升存取速度,易于维护,能够在服务器中根据业务需要动态删除的缓存内容,保证前端浏览实时性以及数据一致性,节省存储空间。
例如,渲染后的页面框架如下所示:
……
<div class=”j_lazy_loading”moduleInstanceId=”10001”area=”head”origin=”0”templateId=”1”prototype=”1”></div>
<div class=”j_lazy_loading”moduleInstanceId=”10002”area=”body”origin=”1”templateId=”2”prototype=”2”></div>
<div class=”j_lazy_loading”moduleInstanceId=”10003”area=”footer”origin=”0”templateId=”3”prototype=”3”></div>
……
</html>
步骤S203,浏览器解析渲染后的页面框架,以获得页面模块标识,并通过内容分发网络向服务器发起包含页面模块标识的页面模块请求。
在步骤S203中,渲染后的页面框架可以是具有DOM(Document Object Model,即文档对象模型)结构的页面框架。浏览器可以利用 JavaScript引擎解析渲染后的页面框架,以获得页面模块标识。页面模块标识可以标识页面模块在页面框架中的位置,是将页面模块填充到页面框架的依据。浏览器可以依据页面模块的数量,发送相同数量的页面模块请求。
步骤S204,服务器依据页面模块请求,渲染页面模块,将渲染后的页面模块发送至内容分发网络。
在步骤S204中,服务器接收内容分发网络发送的页面模块请求,可以判断本地Redis集群中是否缓存有渲染后的页面模块,若有,则可以将缓存的渲染后的页面模块通过内容分发网络发送至浏览器;若无,则可以渲染页面模块,将渲染后的页面模块通过内容分发网络发送至浏览器。并且,可以将渲染后的页面模块缓存至本地Redis集群。
步骤S205,内容分发网络依据页面模块标识,将渲染后的页面模块填充到渲染后的页面框架中形成页面框架,将页面发送至浏览器。
在步骤S205中,内容分发网络依据页面模块标识,将渲染后的页面模块填充到渲染后的页面框架中形成JSON(JavaScript Object Notation,轻量级的数据交换格式)结构的页面。
例如:JSON结构示例如下所示:
{
“result”:true,//标识模块渲染是否成功
“moduleText”:”<div>.....</div>”,//模块内容HTML
“moduleInstanceId”:”10001”//模块标识,用于寻找模块在页面中的位置
}
通过本发明实施例提供的一种提高页面加载速度的方法,通过对页面框架和页面模块进行异步化渲染,分散页面渲染请求,加快模块渲染的速度,提高页面加载速度。
实施例二
本发明实施例提供的一种提高页面加载速度的方法,该方法可适用于加载页面的情况下,该方法基于包括Web(互联网)服务器和应用服务器的服务器,如图3所示,该方法具体包括:
步骤S301,内容分发网络(CDN)接收页面框架请求。
步骤S302,内容分发网络判断是否缓存有页面框架,若无,则执行步骤S303;若有,则执行步骤S308。
步骤S303,内容分发网络向互联网发送页面框架请求,互联网(Web)服务器接收内容分发网络发送的页面框架请求。
在步骤S303中,互联网服务器优选地是Nginx(一款轻量级的Web服务器/反向代理服务器及电子邮件代理服务器),Nginx接受页面框架请求后,若页面框架请求符合Nginx的匹配规则,则执行步骤S304。
步骤S304,互联网服务器判断是否缓存有渲染后的页面框架,若有,则执行步骤S308;若无,执行步骤S305。
在步骤S304中,互联网服务器可以以Lua脚本语言判断是否缓存有渲染后的页面框架。
步骤S305,互联网服务器将页面框架请求发送至应用服务器,应用服务器依据页面框架请求,渲染页面框架,并将渲染后的页面框架发送至互联网服务器。
在步骤S305中,应用服务器可以是Tomcat(一个免费的开放源代码的Web应用服务器)实例。
步骤S306,互联网服务器接收渲染后的页面框架,在内存中缓存有渲染后的页面框架,并将渲染后的页面框架发送至内容分发网络。
步骤S307,内容分发网络接收渲染后的页面框架,在内存中缓存渲染后的页面框架。
步骤S308,向浏览器发送渲染后的页面框架。
步骤S309,浏览器解析渲染后的页面框架,以获得页面模块标识,浏览器向内容分发网络发送页面模块请求。
步骤S310,内容分发网络接收页面模块请求,并判断是否缓存有渲染后的页面模块,若有,执行步骤318;若无,执行步骤S311。
步骤S311,内容分发网络向将页面模块请求发送至互联网服务器。
步骤S312,互联网服务器接收页面模块请求,判断渲染后的页面框架请求是否需要缓存,若不需要缓存,则执行步骤S314;若需要缓存,则执行步骤S313。
在步骤S312中,部分页面模块需要实时渲染,例如搜索模块,则搜索模块不需要缓存;部分页面模块不需要实时渲染,例如日期模块,则日期模块不需要缓存。
步骤S313,互联网服务器判断是否缓存有渲染后的页面模块,若缓存有渲染后的页面模块,则向内容分发网络发送渲染后的页面模块;若无,则执行步骤S314。
步骤S314,互联网服务器将页面模块请求发送至应用服务器,应用服务器依据页面模块请求,渲染页面模块,在内存中缓存渲染后的页面模块。
步骤S315,并将渲染后的页面模块发送至互联网服务器。
步骤S316,互联网服务器接收渲染后的页面模块,在内存中缓存渲染后的页面模块,并将渲染后的页面模块发送至内容分发网络。
步骤S317,内容分发网络判断服务器渲染页面过程是否超时,若未超时,则执行步骤S318;若超时,则结束页面模块请求。
步骤S318,则将渲染后的页面模块填充到渲染后的页面框架中形成页面框架,将页面发送至浏览器。
通过本发明实施例提供的一种提高页面加载速度的方法,通过对页面框架和页面模块进行异步化渲染,分散页面渲染请求,加快模块渲染的速度,提高页面加载速度。
实施例三
本发明实施例提供了一种提高页面加载速度的系统,如图4所示,包括:内容分发网络41、服务器42和浏览器43。
其中,内容分发网络41,用于接收浏览器43发送的页面框架请求,向服务器42发起页面框架请求;服务器42,用于依据页面框架请求,渲染页面框架,将渲染后的页面框架通过内容分发网络41发送至浏览器43;浏览器43,用于解析渲染后的页面框架,以获得页面模块标识,并通过内容分发网络41向服务器42发起包含页面模块标识的页面模块请求;则服务器42,用于依据页面模块请求,渲染页面模块,将渲染后的页面模块发送至内容分发网络41;内容分发网络41,用于 依据页面模块标识,将渲染后的页面模块填充到渲染后的页面框架中形成页面框架,将页面发送至浏览器43。
在内容分发网络41中,基于Ajax(Asynchronous JavaScript And XML,异步JavaScript和XML)即一种创建交互式网页应用的网页开发技术,可以实现页面异步更新。即可以先渲染页面框架,然后渲染页面模块。从而,内容分发网络(CDN,Content Delivery Network)可以接收浏览器发送的页面框架请求。内容分发网络可以判断是否缓存有与页面框架请求对应的页面框架,若缓存有与页面框架请求对应的页面框架,则可以直接向浏览器发送页面框架,实现快速响应页面框架请求,提高页面加载速度;若未缓存与页面框架请求对应的页面框架,则可以向服务器发起页面框架请求,以获得服务器渲染后的页面框架。
服务器42中,可以接收内容分发网络发送的页面框架请求,可以判断本地Redis集群中是否缓存有渲染后的页面框架,若有,则可以将缓存的渲染后的页面框架通过内容分发网络发送至浏览器;若无,则可以渲染页面框架,将渲染后的页面框架通过内容分发网络发送至浏览器。并且,可以将渲染后的页面框架缓存至本地Redis集群。相对于现有技术中将渲染后的页面缓存至硬盘,提升存取速度,易于维护,能够在应用服务器中根据业务需要动态删除的缓存内容,保证前端浏览实时性以及数据一致性,节省存储空间。
在浏览器43中,渲染后的页面框架可以是具有DOM(Document Object Model,即文档对象模型)结构的页面框架。浏览器可以利用JavaScript引擎解析渲染后的页面框架,以获得页面模块标识。页面模块标识可以标识页面模块在页面框架中的位置,是将页面模块填充到页面框架的依据。浏览器可以依据页面模块的数量,发送相同数量的页面模块请求。
在服务器42中,还可以接收内容分发网络发送的页面模块请求,可以判断本地Redis集群中是否缓存有渲染后的页面模块,若有,则可以将缓存的渲染后的页面模块通过内容分发网络发送至浏览器;若无,则可以渲染页面模块,将渲染后的页面模块通过内容分发网络发送至浏览器。并且,可以将渲染后的页面模块缓存至本地Redis集群。
在内容分发网络41中,还可以依据页面模块标识,将渲染后的页面模块填充到渲染后的页面框架中形成JSON(JavaScript Object Notation,轻量级的数据交换格式)结构的页面。
通过本发明实施例提供的一种提高页面加载速度的方法,通过对页面框架和页面模块进行异步化渲染,分散页面渲染请求,加快模块渲染的速度,提高页面加载速度。
实施例四
本发明实施例提供了一种提高页面加载速度的系统,优选地是,应用服务器包括互联网服务器和应用服务器,如图5和图6所示,该系统包括:内容分发网络61、互联网服务器62、应用服务器63和浏览器64。
内容分发网络61具体用于,接收页面框架请求,判断是否缓存有页面框架,若无,则向服务器发送页面框架请求;若有,则将页面框架发送给浏览器64。
互联网服务器62,用于接收内容分发网络61发送的页面框架请求,判断是否缓存有渲染后的页面框架,若有,则向浏览器64发送渲染后的页面框架;若无,则将页面框架请求发送至应用服务器63;
应用服务器63,用于依据页面框架请求,渲染页面框架,并将渲染后的页面框架发送至互联网服务器62;则
互联网服务器62,用于接收渲染后的页面框架,在内存中缓存渲染后的页面框架,并将渲染后的页面框架通过内容分发网络61发送至内容分发网络61。
内容分发网络61具体用于,接收渲染后的页面框架,在内存中缓存渲染后的页面框架,并向浏览器64发送渲染后的页面框架。
浏览器64,用于向内容分发网络61发送页面模块请求;则
内容分发网络61,具体用于接收页面模块请求,并判断是否缓存有渲染后的页面模块,若有,则向浏览器64发送渲染后的页面模块;若无,则向将页面模块请求发送至服务器。
互联网服务器62,用于接收页面模块请求,判断渲染后的页面框架请求是否需要缓存,若不需要缓存,则向应用服务器63发送页面模块请求;若需要缓存,则判断是否缓存有渲染后的页面模块,若缓存渲染后的页面模块,则向应用服务器63发送渲染后的页面模块;若无,则将页面模块请求发送至应用服务器63;
应用服务器63,用于依据页面模块请求,渲染页面模块,在内存中缓存渲染后的页面模块,并将渲染后的页面模块发送至互联网服务器62;则
互联网服务器62,用于接收渲染后的页面模块,在内存中缓存渲染后的页面模块,并将渲染后的页面模块发送至内容分发网络61。
内容分发网络61,具体用于判断服务器渲染页面过程是否超时,若未超时,则将渲染后的页面模块填充到渲染后的页面框架中形成页面框架,将页面发送至浏览器64;若超时,则结束页面模块请求。
通过本发明实施例提供的一种提高页面加载速度的方法,通过对页面框架和页面模块进行异步化渲染,分散页面渲染请求,加快模块渲染的速度,提高页面加载速度。
请注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。

Claims (14)

  1. 一种提高页面加载速度的方法,其特征在于,包括:
    内容分发网络接收浏览器发送的页面框架请求,向服务器发起页面框架请求;
    所述服务器依据所述页面框架请求,渲染页面框架,将渲染后的页面框架通过所述内容分发网络发送至所述浏览器;
    所述浏览器解析所述渲染后的页面框架,以获得页面模块标识,并通过所述内容分发网络向所述服务器发起包含所述页面模块标识的页面模块请求;
    所述服务器依据所述页面模块请求,渲染页面模块,将渲染后的页面模块发送至所述内容分发网络;
    所述内容分发网络依据所述页面模块标识,将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
  2. 根据权利要求1所述的方法,其特征在于,所述内容分发网络接收浏览器发送的页面框架请求,向服务器发起页面框架请求具体包括:
    所述内容分发网络接收所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则向所述服务器发送页面框架请求。
  3. 根据权利要求2所述的方法,其特征在于,所述服务器依据所述页面框架请求,渲染页面框架,将渲染后的页面框架通过所述内容分发网络发送至所述浏览器,具体包括:
    互联网服务器接收所述内容分发网络发送的所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则将所述页面框架请求发送至应用服务器;
    所述应用服务器,依据所述页面框架请求,渲染页面框架,并将所述渲染后的页面框架发送至所述互联网服务器;
    所述互联网服务器接收所述渲染后的页面框架,在内存中缓存所述渲染后的页面框架,并将所述渲染后的页面框架通过所述内容分发网络发送至所述浏览器。
  4. 根据权利要求3所述的方法,其特征在于,所述并将所述渲染后的页面框架通过所述内容分发网络发送至所述浏览器包括:
    所述互联网服务器向所述内容分发网络发送所述渲染后的页面框架,所述内容分发网络接收所述渲染后的页面框架,缓存所述渲染后的页面框架,并向所述浏览器发送所述渲染后的页面框架。
  5. 根据权利要求1所述的方法,其特征在于,所述并通过所述内容分发网络向所述服务器发起包含所述页面模块标识的页面模块请求,具体包括:
    所述浏览器向所述内容分发网络发送所述页面模块请求;
    所述内容分发网络接收所述页面模块请求,并判断是否缓存有渲染后的页面模块,若无,则向将所述页面模块请求发送至所述服务器。
  6. 根据权利要求5所述的方法,其特征在于,所述服务器依据所述页面模块请求,渲染页面模块,将渲染后的页面模块发送至所述内容分发网络,具体包括:
    互联网服务器接收所述页面模块请求,判断所述渲染后的页面框架请求是否需要缓存,若不需要缓存,则向应用服务器发送所述页面模块请求;若需要缓存,则判断是否缓存有所述渲染后的页面模块,若无,则将所述页面模块请求发送至所述应用服务器;
    所述应用服务器,依据所述页面模块请求,渲染页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述互联网服务器;
    所述互联网服务器接收所述渲染后的页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述内容分发网络。
  7. 根据权利要求1所述的方法,其特征在于,所述内容分发网络依据所述页面模块标识,将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器,具体包括:
    所述内容分发网络判断所述服务器渲染页面过程是否超时,若未超时,则将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
  8. 一种提高页面加载速度的系统,其特征在于,包括:内容分发网络、服务器和浏览器;
    所述内容分发网络,用于接收浏览器发送的页面框架请求,向服务器发起页面框架请求;
    所述服务器,用于依据所述页面框架请求,渲染页面框架,将渲染后的页面框架通过所述内容分发网络发送至所述浏览器;
    所述浏览器,用于解析所述渲染后的页面框架,以获得页面模块标识,并通过所述内容分发网络向所述服务器发起包含所述页面模块标识的页面模块请求;则
    所述服务器,用于依据所述页面模块请求,渲染页面模块,将渲染后的页面模块发送至所述内容分发网络;
    所述内容分发网络,用于依据所述页面模块标识,将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
  9. 根据权利要求8所述的系统,其特征在于,所述内容分发网络具体用于,接收所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则向所述服务器发送页面框架请求;。
  10. 根据权利要求9所述的系统,其特征在于,所述服务器包括到联网服务器和应用服务器;
    互联网服务器,用于接收所述内容分发网络发送的所述页面框架请求,判断是否缓存有所述渲染后的页面框架,若无,则将所述页面框架请求发送至应用服务器;
    所述应用服务器,用于依据所述页面框架请求,渲染页面框架,并将所述渲染后的页面框架发送至所述互联网服务器;则
    所述互联网服务器,用于接收所述渲染后的页面框架,在内存中缓存所述渲染后的页面框架,并将所述渲染后的页面框架通过所述内容分发网络发送至所述浏览器。
  11. 根据权利要求10所述的系统,其特征在于,所述内容分发网络具体用于,接收所述互联网服务器发送的所述渲染后的页面框架,缓存所述渲染后的页面框架,并向所述浏览器发送所述渲染后的页面框架。
  12. 根据权利要求8所述的系统,其特征在于,所述浏览器,用于向所述内容分发网络发送所述页面模块请求;则
    所述内容分发网络,具体用于接收所述页面模块请求,并判断是否缓存有渲染后的页面模块,若无,则向将所述页面模块请求发送至所述服务器。
  13. 根据权利要求12所述的系统,其特征在于,互联网服务器,用于接收所述页面模块请求,判断所述渲染后的页面框架请求是否需要缓存,若不需要缓存,则向应用服务器发送所述页面模块请求;若需要缓存,则判断是否缓存有所述渲染后的页面模块,若无,则将所述页面模块请求发送至所述应用服务器;
    所述应用服务器,用于依据所述页面模块请求,渲染页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述互联网服务器;则
    所述互联网服务器,用于接收所述渲染后的页面模块,在内存中缓存所述渲染后的页面模块,并将所述渲染后的页面模块发送至所述内容分发网络。
  14. 根据权利要求8所述的系统,其特征在于,所述内容分发网络,具体用于判断所述服务器渲染页面过程是否超时,若未超时,则将渲染后的页面模块填充到所述渲染后的页面框架中形成页面,将所述页面发送至所述浏览器。
PCT/CN2016/070400 2015-01-12 2016-01-07 一种提高页面加载速度的方法及系统 WO2016112826A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/542,084 US10762159B2 (en) 2015-01-12 2016-01-07 Method and system for increasing page loading rate
RU2017128099A RU2691838C2 (ru) 2015-01-12 2016-01-07 Способ и система для увеличения скорости загрузки страницы
JP2017536841A JP6428944B2 (ja) 2015-01-12 2016-01-07 ページ読み込み速度を増大させるための方法及びシステム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510015200.9A CN104573025B (zh) 2015-01-12 2015-01-12 一种提高页面加载速度的方法及系统
CN201510015200.9 2015-01-12

Publications (1)

Publication Number Publication Date
WO2016112826A1 true WO2016112826A1 (zh) 2016-07-21

Family

ID=53089087

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/070400 WO2016112826A1 (zh) 2015-01-12 2016-01-07 一种提高页面加载速度的方法及系统

Country Status (5)

Country Link
US (1) US10762159B2 (zh)
JP (1) JP6428944B2 (zh)
CN (1) CN104573025B (zh)
RU (1) RU2691838C2 (zh)
WO (1) WO2016112826A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960502A (zh) * 2017-12-22 2019-07-02 南京欣网互联网络科技有限公司 一种应用于电信运营商电子渠道的软件系统公告方法
CN111355766A (zh) * 2018-12-20 2020-06-30 福建福昕软件开发股份有限公司 Pdf文件在网络上按需加载的渲染方法
RU2729053C1 (ru) * 2016-11-22 2020-08-04 Бейдзин Цзиндун Сенчури Трэйдинг Ко., Лтд. Способ и устройство для онлайн-предпросмотра документа

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573025B (zh) * 2015-01-12 2018-09-04 北京京东尚科信息技术有限公司 一种提高页面加载速度的方法及系统
CN105516333B (zh) * 2015-12-23 2018-10-23 北京奇虎科技有限公司 一种基于网页的交互方法和系统
CN105468324A (zh) * 2015-12-25 2016-04-06 北京奇虎科技有限公司 页面显示方法、装置及系统
CN106933851A (zh) * 2015-12-30 2017-07-07 阿里巴巴集团控股有限公司 渲染网页的方法、装置和系统
CN107025096B (zh) * 2016-01-29 2020-05-26 滴滴(中国)科技有限公司 异步渲染模块的同步方法及系统
CN105868319B (zh) * 2016-03-25 2019-09-20 广州酷狗计算机科技有限公司 网页加载方法及装置
CN107402938B (zh) * 2016-05-22 2021-07-13 阿里巴巴(中国)有限公司 页面展示方法、装置和客户端设备
US10447759B2 (en) * 2016-05-27 2019-10-15 Microsoft Technology Licensing, Llc Web page accelerations for web application hosted in native mobile application
CN107451145A (zh) * 2016-05-31 2017-12-08 北京京东尚科信息技术有限公司 基于多维度多数据源渲染来生成动态页面的方法和装置
CN106657258B (zh) * 2016-11-04 2019-07-12 成都视达科信息技术有限公司 一种基于nginx+lua的安全加速中间件实现方法及装置
CN108156013B (zh) * 2016-12-02 2021-08-10 阿里巴巴集团控股有限公司 一种页面服务容灾方法、装置及电子设备
CN108241703B (zh) * 2016-12-27 2022-01-18 腾讯科技(深圳)有限公司 网页数据传输方法和装置
CN110020349B (zh) * 2017-09-26 2021-09-03 北京京东尚科信息技术有限公司 页面渲染的方法及装置
CN107729516A (zh) * 2017-10-26 2018-02-23 北京百度网讯科技有限公司 单页应用展示方法和装置、服务器、设备及可读介质
CN108337327A (zh) * 2018-04-26 2018-07-27 拉扎斯网络科技(上海)有限公司 一种资源获取方法和代理服务器
CN108629032A (zh) * 2018-05-09 2018-10-09 厦门南讯软件科技有限公司 一种基于延时加载的页面快速响应方法及装置
CN108762622B (zh) * 2018-06-04 2021-08-13 北京搜狐新动力信息技术有限公司 一种页面的切换显示方法及装置
CN109344351B (zh) * 2018-10-18 2021-01-05 网宿科技股份有限公司 网页加载方法、中间服务器和网页加载系统
CN109343858A (zh) * 2018-11-01 2019-02-15 成都嗨翻屋科技有限公司 一种基于服务端渲染的自动建站容器部署系统及其工作方法
CN109902248B (zh) * 2019-02-25 2021-07-13 百度在线网络技术(北京)有限公司 页面显示方法、装置、计算机设备和可读存储介质
CN110059278A (zh) * 2019-03-12 2019-07-26 平安普惠企业管理有限公司 Web页面配置方法、服务器及计算机可读存储介质
CN111723321A (zh) * 2019-03-22 2020-09-29 阿里巴巴集团控股有限公司 页面请求方法、装置及存储介质
CN110110263B (zh) * 2019-05-13 2020-07-28 北京三快在线科技有限公司 网页显示方法、装置、终端及存储介质
CN110633434B (zh) * 2019-07-19 2024-02-27 北京有竹居网络技术有限公司 一种页面缓存方法、装置、电子设备及存储介质
CN110633433B (zh) * 2019-07-19 2024-02-27 北京有竹居网络技术有限公司 一种页面缓存方法、装置、电子设备及存储介质
CN112836152B (zh) * 2019-11-22 2023-03-10 上海哔哩哔哩科技有限公司 页面渲染方法、系统、计算机设备及计算机可读存储介质
CN111026962B (zh) * 2019-12-03 2023-09-22 泰康保险集团股份有限公司 层级关系查询响应时间降低方法、服务器和用户前端
CN110990736A (zh) * 2019-12-05 2020-04-10 秒针信息技术有限公司 页面加载方法、装置、终端设备和存储介质
CN111061478B (zh) * 2019-12-11 2023-08-22 政采云有限公司 一种页面表单修改方法、装置、设备及可读存储介质
CN111565229B (zh) * 2020-04-29 2020-11-27 创盛视联数码科技(北京)有限公司 一种基于Redis的通信系统分布式方法
CN111708600B (zh) * 2020-08-20 2021-06-11 腾讯科技(深圳)有限公司 页面显示方法、装置、设备及计算机可读存储介质
CN112434237A (zh) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 页面加载方法、装置、电子设备及存储介质
CN112615908B (zh) * 2020-12-08 2023-04-18 广东荣文科技集团有限公司 网页处理方法、电子设备及相关产品
CN113051507B (zh) * 2021-03-29 2023-11-21 北京智慧星光信息技术有限公司 基于json数据构建双向绑定的web页面前端展示方法和系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770511A (zh) * 2009-12-31 2010-07-07 优视科技有限公司 一种用于移动通讯设备终端加快回退操作的浏览系统及其应用方法
CN102185923A (zh) * 2011-05-16 2011-09-14 广州市动景计算机科技有限公司 一种移动通讯设备终端网页浏览方法
CN102917074A (zh) * 2012-11-09 2013-02-06 北京奇虎科技有限公司 一种实现服务器端浏览器的方法和服务器
US20130073946A1 (en) * 2011-09-21 2013-03-21 Mstar Semiconductor, Inc. Method and apparatus for loading webpage content of webkit browser
WO2014189728A1 (en) * 2013-05-22 2014-11-27 Alibaba Group Holding Limited Loading image information
CN104573025A (zh) * 2015-01-12 2015-04-29 北京京东尚科信息技术有限公司 一种提高页面加载速度的方法及系统

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2001290546A1 (en) * 2000-08-22 2002-03-04 Akamai Technologies, Inc. Dynamic content assembly on edge-of-network servers in a content delivery network
WO2002071242A1 (en) * 2001-03-01 2002-09-12 Akamai Technologies, Inc. Optimal route selection in a content delivery network
JP2005004629A (ja) * 2003-06-13 2005-01-06 Hitachi Ltd ページ生成方法及びその装置
CN101551819B (zh) * 2009-04-30 2011-12-07 用友软件股份有限公司 渲染大型Web页面的方法
US20100299205A1 (en) * 2009-05-20 2010-11-25 David Erdmann Protected serving of electronic content
US10198523B2 (en) * 2009-06-03 2019-02-05 Microsoft Technology Licensing, Llc Utilizing server pre-processing to deploy renditions of electronic documents in a computer network
US10296653B2 (en) * 2010-09-07 2019-05-21 F5 Networks, Inc. Systems and methods for accelerating web page loading
US8874750B2 (en) * 2011-03-29 2014-10-28 Mobitv, Inc. Location based access control for content delivery network resources
US8516041B1 (en) 2011-05-18 2013-08-20 Amazon Technologies, Inc. Pre-fetching asynchronously requested content
WO2012160499A1 (en) 2011-05-23 2012-11-29 Strangeloop Networks, Inc. Optimized rendering of dynamic content
US9384101B2 (en) * 2011-07-26 2016-07-05 Apple Inc. Web application architecture
US20130332284A1 (en) * 2012-06-11 2013-12-12 Retailmenot, Inc. Cross-device offers platform
CN103412890B (zh) * 2013-07-19 2017-06-06 北京亿赞普网络技术有限公司 一种网页加载方法和装置
CN103761317B (zh) * 2014-01-27 2017-08-29 北京京东尚科信息技术有限公司 一种多线程异步渲染系统及方法
US10049033B2 (en) * 2014-06-03 2018-08-14 Sap Se Application gateway for cloud computing systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770511A (zh) * 2009-12-31 2010-07-07 优视科技有限公司 一种用于移动通讯设备终端加快回退操作的浏览系统及其应用方法
CN102185923A (zh) * 2011-05-16 2011-09-14 广州市动景计算机科技有限公司 一种移动通讯设备终端网页浏览方法
US20130073946A1 (en) * 2011-09-21 2013-03-21 Mstar Semiconductor, Inc. Method and apparatus for loading webpage content of webkit browser
CN102917074A (zh) * 2012-11-09 2013-02-06 北京奇虎科技有限公司 一种实现服务器端浏览器的方法和服务器
WO2014189728A1 (en) * 2013-05-22 2014-11-27 Alibaba Group Holding Limited Loading image information
CN104573025A (zh) * 2015-01-12 2015-04-29 北京京东尚科信息技术有限公司 一种提高页面加载速度的方法及系统

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2729053C1 (ru) * 2016-11-22 2020-08-04 Бейдзин Цзиндун Сенчури Трэйдинг Ко., Лтд. Способ и устройство для онлайн-предпросмотра документа
US11256773B2 (en) 2016-11-22 2022-02-22 Beijing Jingdong Shangke Information Technology Co., Ltd. Document online preview method and device
CN109960502A (zh) * 2017-12-22 2019-07-02 南京欣网互联网络科技有限公司 一种应用于电信运营商电子渠道的软件系统公告方法
CN109960502B (zh) * 2017-12-22 2022-04-05 南京欣网互联网络科技有限公司 一种应用于电信运营商电子渠道的软件系统公告方法
CN111355766A (zh) * 2018-12-20 2020-06-30 福建福昕软件开发股份有限公司 Pdf文件在网络上按需加载的渲染方法
CN111355766B (zh) * 2018-12-20 2023-08-04 福建福昕软件开发股份有限公司 Pdf文件在网络上按需加载的渲染方法

Also Published As

Publication number Publication date
US20180276308A1 (en) 2018-09-27
CN104573025B (zh) 2018-09-04
CN104573025A (zh) 2015-04-29
RU2017128099A3 (zh) 2019-02-14
US10762159B2 (en) 2020-09-01
RU2691838C2 (ru) 2019-06-18
RU2017128099A (ru) 2019-02-14
JP2018504705A (ja) 2018-02-15
JP6428944B2 (ja) 2018-11-28

Similar Documents

Publication Publication Date Title
WO2016112826A1 (zh) 一种提高页面加载速度的方法及系统
US8375296B2 (en) Reusing style sheet assets
US10210145B2 (en) Partial website optimization for a web publisher
US9753904B2 (en) Fast rendering of websites containing dynamic content and stale content
CN102438045B (zh) Web页面的预取方法、系统以及访问web页面的方法
US7509404B2 (en) Methods and systems for partial page caching of dynamically generated content
US8762490B1 (en) Content-facilitated speculative preparation and rendering
US8516041B1 (en) Pre-fetching asynchronously requested content
CN103383687B (zh) 一种页面处理方法和装置
CN102684986B (zh) 一种终端显示图片的方法和系统
CN108848108A (zh) 基于移动互联网+的创新项目pdca过程管理平台
US8874687B2 (en) System and method for dynamically modifying content based on user expectations
US20140006918A1 (en) Method and system for web page rearrangement
US11295492B2 (en) Electronic device and server related to rendering of web content and controlling method thereof
US20140245124A1 (en) System and method thereof for browser agnostic extension models
US9087134B2 (en) Systems and methods for decorating web pages
US9336319B2 (en) Data file and rule driven synchronous or asynchronous document generation
Cao et al. The solution of web font-end performance optimization
CN108810070A (zh) 一种资源共享方法、装置、智能设备和存储介质
JP2009246506A (ja) 一種のユーザ身分追跡方法
EP3281128B1 (en) Electronic device and server related to rendering of web content and controlling method thereof
CN106933937A (zh) 一种网页打开方法及装置、客户端
KR101050174B1 (ko) 무선 네트워크 시스템 및 무선 네트워크 웹 가속기, 및 무선 네트워크 지원방법
CN103631595A (zh) 基于CXF开发Web Service的方法
Zhang et al. Research and design of web application framework based on ajax

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16737052

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15542084

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2017536841

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017128099

Country of ref document: RU

Kind code of ref document: A

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 19/09/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 16737052

Country of ref document: EP

Kind code of ref document: A1