CN107918643A - A kind of Webpage display process and terminal - Google Patents

A kind of Webpage display process and terminal Download PDF

Info

Publication number
CN107918643A
CN107918643A CN201711038167.7A CN201711038167A CN107918643A CN 107918643 A CN107918643 A CN 107918643A CN 201711038167 A CN201711038167 A CN 201711038167A CN 107918643 A CN107918643 A CN 107918643A
Authority
CN
China
Prior art keywords
web page
webpage
page template
frequency
business function
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.)
Pending
Application number
CN201711038167.7A
Other languages
Chinese (zh)
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.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201711038167.7A priority Critical patent/CN107918643A/en
Publication of CN107918643A publication Critical patent/CN107918643A/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to data processing field, more particularly to a kind of Webpage display process and terminal.The present invention obtains the packet of more than one web page resources by dividing web page resources by business function;The web page resources are made of business datum and web page template corresponding with the business function;When starting client, more than one described web page template corresponding with web page resources packet more than one described is loaded;Loading business datum corresponding with a webpage, obtains current service data;One webpage is shown according to the current service data and web page template corresponding with a webpage.Realize the speed for improving client loading webpage.

Description

A kind of Webpage display process and terminal
Technical field
The present invention relates to data processing field, more particularly to a kind of Webpage display process and terminal.
Background technology
There is cross-platform, dynamic renewal, small and infinite expanding applied to the Web App on mobile terminal, Therefore, Web page is embedded in more and more APP clients.Under normal circumstances, loading a webpage needs by initialization Webview components, requests for page, downloading data, parsing html file, request JS/CSS resources, dom render, parse JS execution, JS request datas, parsing render and download renders picture, it loads the complexity of webpage process and client is loaded The speed of one webpage is slow, so as to cause to be in white screen state in a period, user experience is poor.
The content of the invention
The technical problems to be solved by the invention are:How the speed of client loading webpage is improved.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:
The present invention provides a kind of Webpage display process, including:
Web page resources are divided by business function, obtain the packet of more than one web page resources;The web page resources are by business number Formed according to web page template corresponding with the business function;
When starting client, more than one described webpage mould corresponding with web page resources packet more than one described is loaded Plate;
Loading business datum corresponding with a webpage, obtains current service data;
One webpage is shown according to the current service data and web page template corresponding with a webpage.
The present invention also provides a kind of web displaying terminal, including one or more processors and memory, the memory Have program stored therein, and be configured to perform following steps by one or more of processors:
Web page resources are divided by business function, obtain the packet of more than one web page resources;The web page resources are by business number Formed according to web page template corresponding with the business function;
When starting client, more than one described webpage mould corresponding with web page resources packet more than one described is loaded Plate;
Loading business datum corresponding with a webpage, obtains current service data;
One webpage is shown according to the current service data and web page template corresponding with a webpage.
The beneficial effects of the present invention are:Web page resources are divided into web page template and business datum two parts by the present invention, The webpage for belonging to same business function has identical web page template, but the business datum being particularly shown is different.Starting visitor During the end of family, web page template corresponding with each business function is loaded, completes the actions such as the loading parsing of web page template related resource, So that during subsequently using client, the web page template corresponding with particular webpage loaded only need to be directly invoked, and Business datum corresponding with particular webpage is obtained, relevant web page resources is rendered without expending time resolution, improves After client terminal start-up, the speed of webpage loading, effectively prevent white screen phenomenon, improves user experience.Meanwhile the present invention is in visitor When family end starts, a business function only loads a web page template, without loading the resource of all webpages in advance, saves sky Between and flow.For example, a client has 10 business functions, each business function has 5 corresponding webpages, then this hair It is bright that 10 web page templates need to be only loaded in the client terminal start-up, without loading the resource of 50 webpages.
Brief description of the drawings
Fig. 1 is a kind of FB(flow block) of the embodiment of Webpage display process provided by the invention;
Fig. 2 is a kind of structure diagram of the embodiment of web displaying terminal provided by the invention;
Label declaration:
1st, processor;2nd, memory.
Embodiment
For the technology contents that the present invention will be described in detail, the objects and the effects, below in conjunction with embodiment and coordinate attached Figure is explained.
Fig. 1 and Fig. 2 is refer to,
As shown in Figure 1, the present invention provides a kind of Webpage display process, including:
Web page resources are divided by business function, obtain the packet of more than one web page resources;The web page resources are by business number Formed according to web page template corresponding with the business function;
When starting client, more than one described webpage mould corresponding with web page resources packet more than one described is loaded Plate;
Loading business datum corresponding with a webpage, obtains current service data;
One webpage is shown according to the current service data and web page template corresponding with a webpage.
Further, further include:
When the active volume of memory is less than default capacity threshold, more than one described webpage mould with having loaded is obtained The corresponding frequency of use of plate, obtains frequency of use set;
The web page template according to the frequency of use set deletes predetermined number.
Further, the web page template according to the frequency of use set deletes predetermined number, is specially:
Element in the frequency of use set that sorts from small to large, obtains frequency of use ordered set;
Delete web page template corresponding with element described in preceding predetermined number.
Seen from the above description, when low memory, the relatively low web page template of frequency of use is automatically deleted, it is empty to save memory Between, be conducive to maintain the fluency for browsing webpage.
Further, when starting client, loading it is corresponding with web page resources packet more than one described more than one The web page template, is specially:
When starting client,
S1, create Webview components corresponding with a business function;
S2, the Webview components load web page template corresponding with a business function;
Step S1 to S2 is repeated, until traveling through more than one described web page resources packet.
Seen from the above description, Webview components, which are used to manage, has the function of more than one webpages of identical services, when opening During dynamic client, create and initialize Webview components, and web page template is loaded by Webview components automatically.
Further, business datum corresponding with a webpage is loaded, obtains current service data, is specially:
When showing a Webview components,
Identification business function corresponding with the Webview components;
Renewal business datum corresponding with the business function.
Seen from the above description, when showing a Webview components, other Webview components are hidden, only with currently The business datum of the corresponding business function of Webview components of display is updated, and the webpage of other Webview assembly managements is rear Platform will not go request renewal business datum, reduce request amount, save flow consumption.
As shown in Fig. 2, the present invention also provides a kind of web displaying terminal, including one or more processors 1 and memory 2, the memory 2 has program stored therein, and is configured to perform following steps by one or more of processors 1:
Web page resources are divided by business function, obtain the packet of more than one web page resources;The web page resources are by business number Formed according to web page template corresponding with the business function;
When starting client, more than one described webpage mould corresponding with web page resources packet more than one described is loaded Plate;
Loading business datum corresponding with a webpage, obtains current service data;
One webpage is shown according to the current service data and web page template corresponding with a webpage.
Further, further include:
When the active volume of memory is less than default capacity threshold, more than one described webpage mould with having loaded is obtained The corresponding frequency of use of plate, obtains frequency of use set;
The web page template according to the frequency of use set deletes predetermined number.
Further, the web page template according to the frequency of use set deletes predetermined number, is specially:
Element in the frequency of use set that sorts from small to large, obtains frequency of use ordered set;
Delete web page template corresponding with element described in preceding predetermined number.
Further, when starting client, loading it is corresponding with web page resources packet more than one described more than one The web page template, is specially:
When starting client,
S1, create Webview components corresponding with a business function;
S2, the Webview components load web page template corresponding with a business function;
Step S1 to S2 is repeated, until traveling through more than one described web page resources packet.
Further, business datum corresponding with a webpage is loaded, obtains current service data, is specially:
When showing a Webview components,
Identification business function corresponding with the Webview components;
Asynchronous refresh business datum corresponding with the business function.
The embodiment of the present invention one is:
The present embodiment provides a kind of Webpage display process, including:
S1, by business function divide web page resources, obtain more than one web page resources packet;The web page resources are by business Data and web page template corresponding with business function composition.
Wherein, web page resources template includes providing necessary to html file, JS files and CSS files etc. show a webpage Source.
S2, when starting client, load corresponding with web page resources packet more than one described more than one described net Page template.
Alternatively, when starting client, S21, create Webview components corresponding with a business function;It is S22, described Webview components load web page template corresponding with a business function;Step S21 to S22 is repeated, until traversal one A the above web page resources packet.
Wherein, Webview components are used to manage more than one webpage with identical services.Webview components Life cycle includes creating, initializes, shows and call and destroy four-stage, and trigger management is loaded by webpage.One webpage Loading trigger manages multiple Webview components at the same time.The webpage of different Webview assembly managements has different business work( Can, for example, the webpage of Webview1 assembly management display of commodity details, Webview2 assembly managements press the net of classification display of commodity Page, the webpage of Webview3 assembly management display of commodity orders.When starting client, webpage loading trigger can disposably be gone Create and initialize Webview components corresponding with all business functions.During initial Webview components, the loading of Webview components Accordingly web page template corresponding with business function.Web page loading process is a very very long process, during which can perform multiple steps Suddenly include requests for page, downloading data, parsing HTML, request JS/CSS resources, dom to render, parse JS execution, JS request datas (either synchronously or asynchronously), parsing renders, downloads and render picture;The step of being rendered from requests for page to dom during completing this is to cause There is the main reason for white screen.The present invention just goes to load corresponding web page template when Webview assembly initializations;Needing When showing a webpage, it need to only be shown by web page trigger device and call the corresponding Webview components for being loaded with web page template , without loading again, both evaded the phenomenon of white screen or saved allowing user to wait the time expended because loading webpage.
S3, loading business datum corresponding with a webpage, obtain current service data.
Alternatively, when showing a Webview components, business function corresponding with the Webview components is identified;It is different Step updates business datum corresponding with the business function.
Wherein, Webview components have been loaded with the web page template shown needed for a webpage at the beginning, therefore, when When being intended to show a webpage according to business demand, only need to since JS request data the step, would not also occur because Dom does not render also to come and the phenomenon of white screen occur.
S4, according to the current service data and web page template corresponding with a webpage show a webpage.
S5, when the active volume of memory is less than default capacity threshold, obtain and more than one described net for having loaded The corresponding frequency of use of page template, obtains frequency of use set.
S6, the web page template according to the frequency of use set deletes predetermined number.
Alternatively, the element in the frequency of use set that sorts from small to large, obtains frequency of use ordered set;Delete Web page template corresponding with element described in preceding predetermined number.
Alternatively, the element that element value is less than default frequency threshold is obtained from frequency of use set, obtains low frequency collection Close;Delete web page template corresponding with the element in the low frequency set.
Wherein, when creating Webview components for the first time, Webview components are carried out first according to the sequencing of establishment Sequence and be sequentially placed into queue storehouse;After the initialization of Webview building components, webpage loading trigger can be wanted according to business The particular webpage known and shown is sought, the Webview components for managing the particular webpage are shown to the work of current mobile terminal In dynamic region, that is, show and call Webview components.Then one is added to the frequency of use of the shown Webview components called, and Resequenced according to the size of frequency of use.When the Out of Memory of system or when more than predetermined threshold value, webpage loading is touched Hair device can perform the operation for destroying the relatively low Webview components of frequency of use so that the webpage loaded by Webview components Template is also deleted, to discharge vacant memory.
The embodiment of the present invention two is:
The present embodiment provides a kind of web displaying terminal, including one or more processors 1 and memory 2, the storage Device 2 has program stored therein, and is configured to perform following steps by one or more of processors 1:
S1, by business function divide web page resources, obtain more than one web page resources packet;The web page resources are by business Data and web page template corresponding with business function composition.
Wherein, web page resources template includes providing necessary to html file, JS files and CSS files etc. show a webpage Source.
S2, when starting client, load corresponding with web page resources packet more than one described more than one described net Page template.
Alternatively, when starting client, S21, create Webview components corresponding with a business function;It is S22, described Webview components load web page template corresponding with a business function;Step S21 to S22 is repeated, until traversal one A the above web page resources packet.
S3, loading business datum corresponding with a webpage, obtain current service data.
Alternatively, when showing a Webview components, business function corresponding with the Webview components is identified;It is different Step updates business datum corresponding with the business function.
Wherein, Webview components have been loaded with the web page template shown needed for a webpage at the beginning, therefore, when When being intended to show a webpage according to business demand, only need to since JS request data the step, would not also occur because Dom does not render also to come and the phenomenon of white screen occur.
S4, according to the current service data and web page template corresponding with a webpage show a webpage.
S5, when the active volume of memory is less than default capacity threshold, obtain and more than one described net for having loaded The corresponding frequency of use of page template, obtains frequency of use set.
S6, the web page template according to the frequency of use set deletes predetermined number.
Alternatively, the element in the frequency of use set that sorts from small to large, obtains frequency of use ordered set;Delete Web page template corresponding with element described in preceding predetermined number.
Alternatively, the element that element value is less than default frequency threshold is obtained from frequency of use set, obtains low frequency collection Close;Delete web page template corresponding with the element in the low frequency set.
In conclusion web page resources are divided into web page template by a kind of Webpage display process provided by the invention and terminal With business datum two parts, belonging to the webpage of same business function has an identical web page template, but the business being particularly shown Data are different.When starting client, web page template corresponding with each business function is loaded, completes web page template related resource Loading parsing etc. action so that subsequently use client during, only need to directly invoke loaded and particular webpage Corresponding web page template, and business datum corresponding with particular webpage is obtained, render correlation without expending time resolution Web page resources, after improving client terminal start-up, webpage loading speed, effectively prevent white screen phenomenon, improve user's body Test.It is all without loading in advance meanwhile the present invention, in client terminal start-up, a business function only loads a web page template The resource of webpage, saves space and flow.Further, when low memory, it is automatically deleted the relatively low webpage of frequency of use Template, saves memory headroom, is conducive to maintain the fluency for browsing webpage.Further, Webview components have for management More than one webpage of identical services function, when starting client, creates and initializes Webview components, and by Webview Component loads web page template automatically.Further, when showing a Webview components, other Webview components are hidden, only The business datum for having business function corresponding with the Webview components currently shown is updated, other Webview assembly managements Webpage will not go request renewal business datum on backstage, reduce request amount, save flow consumption.
The foregoing is merely the embodiment of the present invention, is not intended to limit the scope of the invention, every to utilize this hair The equivalents that bright specification and accompanying drawing content are made, are directly or indirectly used in relevant technical field, similarly include In the scope of patent protection of the present invention.

Claims (10)

  1. A kind of 1. Webpage display process, it is characterised in that including:
    Web page resources are divided by business function, obtain the packet of more than one web page resources;The web page resources by business datum and Web page template composition corresponding with the business function;
    When starting client, more than one described web page template corresponding with web page resources packet more than one described is loaded;
    Loading business datum corresponding with a webpage, obtains current service data;
    One webpage is shown according to the current service data and web page template corresponding with a webpage.
  2. 2. Webpage display process according to claim 1, it is characterised in that further include:
    When the active volume of memory is less than default capacity threshold, more than one described web page template pair with having loaded is obtained The frequency of use answered, obtains frequency of use set;
    The web page template according to the frequency of use set deletes predetermined number.
  3. 3. Webpage display process according to claim 2, it is characterised in that deleted according to the frequency of use set default Web page template described in number, is specially:
    Element in the frequency of use set that sorts from small to large, obtains frequency of use ordered set;
    Delete web page template corresponding with element described in preceding predetermined number.
  4. 4. Webpage display process according to claim 1, it is characterised in that when starting client, loading with one with The upper web page resources are grouped more than one corresponding described web page template, are specially:
    When starting client,
    S1, create Webview components corresponding with a business function;
    S2, the Webview components load web page template corresponding with a business function;
    Step S1 to S2 is repeated, until traveling through more than one described web page resources packet.
  5. 5. Webpage display process according to claim 4, it is characterised in that loading business datum corresponding with a webpage, Current service data is obtained, is specially:
    When showing a Webview components,
    Identification business function corresponding with the Webview components;
    Asynchronous refresh business datum corresponding with the business function.
  6. A kind of 6. web displaying terminal, it is characterised in that including one or more processors and memory, the memory storage There is program, and be configured to perform following steps by one or more of processors:
    Web page resources are divided by business function, obtain the packet of more than one web page resources;The web page resources by business datum and Web page template composition corresponding with the business function;
    When starting client, more than one described web page template corresponding with web page resources packet more than one described is loaded;
    Loading business datum corresponding with a webpage, obtains current service data;
    One webpage is shown according to the current service data and web page template corresponding with a webpage.
  7. 7. web displaying terminal according to claim 6, it is characterised in that further include:
    When the active volume of memory is less than default capacity threshold, more than one described web page template pair with having loaded is obtained The frequency of use answered, obtains frequency of use set;
    The web page template according to the frequency of use set deletes predetermined number.
  8. 8. web displaying terminal according to claim 7, it is characterised in that deleted according to the frequency of use set default Web page template described in number, is specially:
    Element in the frequency of use set that sorts from small to large, obtains frequency of use ordered set;
    Delete web page template corresponding with element described in preceding predetermined number.
  9. 9. web displaying terminal according to claim 6, it is characterised in that when starting client, loading with one with The upper web page resources are grouped more than one corresponding described web page template, are specially:
    When starting client,
    S1, create Webview components corresponding with a business function;
    S2, the Webview components load web page template corresponding with a business function;
    Step S1 to S2 is repeated, until traveling through more than one described web page resources packet.
  10. 10. web displaying terminal according to claim 9, it is characterised in that loading business datum corresponding with a webpage, Current service data is obtained, is specially:
    When showing a Webview components,
    Identification business function corresponding with the Webview components;
    Asynchronous refresh business datum corresponding with the business function.
CN201711038167.7A 2017-10-30 2017-10-30 A kind of Webpage display process and terminal Pending CN107918643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711038167.7A CN107918643A (en) 2017-10-30 2017-10-30 A kind of Webpage display process and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711038167.7A CN107918643A (en) 2017-10-30 2017-10-30 A kind of Webpage display process and terminal

Publications (1)

Publication Number Publication Date
CN107918643A true CN107918643A (en) 2018-04-17

Family

ID=61895821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711038167.7A Pending CN107918643A (en) 2017-10-30 2017-10-30 A kind of Webpage display process and terminal

Country Status (1)

Country Link
CN (1) CN107918643A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222284A (en) * 2019-05-05 2019-09-10 福建天泉教育科技有限公司 Multi-page loading method and computer readable storage medium
CN110830839A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
KR20210097730A (en) * 2019-02-19 2021-08-09 티쎈크로프 마리네 지스템스 게엠베하 Buoyancy Modification Module for Modular Underwater Vehicles

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957712A (en) * 2011-08-17 2013-03-06 阿里巴巴集团控股有限公司 Method and system for loading website resources
US9385979B1 (en) * 2012-03-23 2016-07-05 Google Inc. Customizing posts by activity type and client type
CN106407388A (en) * 2016-09-19 2017-02-15 福建中金在线信息科技有限公司 A web page generating method and apparatus
CN106446055A (en) * 2016-08-31 2017-02-22 陶德龙 Webpage generation method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957712A (en) * 2011-08-17 2013-03-06 阿里巴巴集团控股有限公司 Method and system for loading website resources
US9385979B1 (en) * 2012-03-23 2016-07-05 Google Inc. Customizing posts by activity type and client type
CN106446055A (en) * 2016-08-31 2017-02-22 陶德龙 Webpage generation method and system
CN106407388A (en) * 2016-09-19 2017-02-15 福建中金在线信息科技有限公司 A web page generating method and apparatus

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110830839A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
CN110830839B (en) * 2018-08-08 2022-03-08 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
KR20210097730A (en) * 2019-02-19 2021-08-09 티쎈크로프 마리네 지스템스 게엠베하 Buoyancy Modification Module for Modular Underwater Vehicles
KR102518573B1 (en) 2019-02-19 2023-04-05 티쎈크로프 마리네 지스템스 게엠베하 Buoyancy change module for modular water vehicles
CN110222284A (en) * 2019-05-05 2019-09-10 福建天泉教育科技有限公司 Multi-page loading method and computer readable storage medium
CN110222284B (en) * 2019-05-05 2021-04-02 福建天泉教育科技有限公司 Multi-page loading method and computer readable storage medium

Similar Documents

Publication Publication Date Title
Zhao et al. A novel pre-cache schema for high performance Android system
CN103914205B (en) A kind of file thumbnail methods of exhibiting of intelligent terminal and device
CN106941567A (en) Show method, device and the user terminal of network picture
CN110020325B (en) Page loading method, device, equipment and readable storage medium
CN107918643A (en) A kind of Webpage display process and terminal
CN109361947A (en) Internet resources batch loading method, smart television, storage medium and device
CN105487640A (en) Image pre-loading and caching method of Android watch
CN104104995A (en) Image display method and device
CN110609718A (en) Picture loading method and device, electronic equipment and readable storage medium
CN111782304A (en) Logic control method and device for paging loading data, computer equipment and medium
CN115309470B (en) Method, device, equipment and storage medium for loading widget
CN112926002A (en) Service request processing method and device
CN109190071A (en) Mobile terminal caching method and device
CN117271014A (en) Data processing method and client based on web worker
CN112559109A (en) Method, system, device and medium for generating display interface based on component library
CN115421693A (en) Method and device for realizing micro front-end architecture, computer equipment and storage medium
CN113467776B (en) Method and device for accessing equipment, storage medium and electronic device
CN115438290A (en) Method and system for automatically analyzing static resources of single-page application and preloading
CN111447219B (en) Image display method and device, storage medium and computer equipment
CN107861733A (en) Light application component construction method and computer-readable recording medium
CN106933613B (en) APP page loading method and device
CN113961298A (en) Page switching method, device, equipment and medium
CN106354796A (en) Method, device and server for browser home page resource updating processing
CN115220803A (en) Data processing method and equipment
CN111638927A (en) Skin switching method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180417