CN107748689A - A kind of web page display method and apparatus - Google Patents

A kind of web page display method and apparatus Download PDF

Info

Publication number
CN107748689A
CN107748689A CN201710976978.5A CN201710976978A CN107748689A CN 107748689 A CN107748689 A CN 107748689A CN 201710976978 A CN201710976978 A CN 201710976978A CN 107748689 A CN107748689 A CN 107748689A
Authority
CN
China
Prior art keywords
resource
page
address
version
static
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
CN201710976978.5A
Other languages
Chinese (zh)
Other versions
CN107748689B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710976978.5A priority Critical patent/CN107748689B/en
Publication of CN107748689A publication Critical patent/CN107748689A/en
Application granted granted Critical
Publication of CN107748689B publication Critical patent/CN107748689B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This specification embodiment provides a kind of web page display method and apparatus, and wherein method includes:When rendering the page to be presented, according to Secondary resource address, to the page static resource of the Resource Server acquisition request second edition;When the Resource Server returns to resource acquisition failure, first resource address corresponding with the page static resource of first version is obtained, the first resource address is to determine the address for providing the page static resource;According to the first resource address, to page static resource described in Resource Server acquisition request;Receive and load the page static resource of the Resource Server feedback, to render and show the page.

Description

A kind of web page display method and apparatus
Technical field
This disclosure relates to network technique field, more particularly to a kind of web page display method and apparatus.
Background technology
The mobile Web page is the Web page operated in the APP of mobile terminal.In mobile terminal, can be added by WebView Carry and show the above-mentioned mobile Web page, the WebView can regard the browser of a loaded and displayed webpage as.Wherein, it is shown Mobile web page can include the page data of dynamic renewal, in addition to some static resources for infrequently changing, for example, Various js files, CSS files, picture etc..
Above-mentioned static resource, the function of setting style sheet and interaction characteristic, example can be played in the mobile Web page Such as, js files can make the page have some dynamic interaction attributes, and user can click on button and trigger a corresponding page presentation Operation, or there is certain color by CSS files page elements.Therefore, WebView is in the loading mobile Web page During, it is necessary to obtain, load and parse the static resource that is included in the page, to enable the page normally to show, and ensure Business function normal operation corresponding to the page.
The content of the invention
In view of this, the disclosure provides a kind of web page display method and apparatus, to ensure that page function is normal.
Specifically, this specification one or more embodiment is achieved by the following technical solution:
Second aspect, there is provided a kind of web page display method, methods described include:
When rendering the page to be presented, according to Secondary resource address, into the page described in Resource Server acquisition request Comprising the second edition page static resource;
When the Resource Server returns to resource acquisition failure, the page static resource pair with first version is obtained The first resource address answered, the first resource address are determined to provide the page static resource of the first version;
According to the first resource address, to the static money of the page of first version described in the Resource Server acquisition request Source;
Receive and load the page static resource of the first version of the Resource Server feedback, to render and show The page.
First aspect, there is provided a kind of web page display device, described device include:
Resource request module, for when rendering the page to be presented, according to Secondary resource address, being asked to Resource Server Seek the page static resource for obtaining the second edition included in the page;
Address acquisition module, for when the Resource Server returns to resource acquisition failure, obtaining and first version First resource address corresponding to the page static resource, the first resource address are determined to provide the first version Page static resource;
Re-request module, for according to the first resource address, to described in the Resource Server acquisition request The page static resource of one version;
Resource receiving module, it is static for receiving and loading the page of first version of the Resource Server feedback Resource, to render and show the page.
Second aspect, there is provided a kind of web page display equipment, the equipment includes memory, processor, and is stored in Following steps are realized on reservoir and the computer instruction that can run on a processor, during the computing device instruction:
When rendering the page to be presented, according to Secondary resource address, into the page described in Resource Server acquisition request Comprising the second edition page static resource;
When the Resource Server returns to resource acquisition failure, the page static resource pair with first version is obtained The first resource address answered, the first resource address are determined to provide the page static resource of the first version;
According to the first resource address, to the static money of the page of first version described in the Resource Server acquisition request Source;
Receive and load the page static resource of the first version of the Resource Server feedback, to render and show The page.
The web page display method and apparatus of this specification one or more embodiment, by returning to resource acquisition in server During failure, another version of the resource is asked to server by first resource address, ensure that can get the quiet of the page State resource so that the business function of the page can be transported normally.
Brief description of the drawings
In order to illustrate more clearly of this specification one or more embodiment or technical scheme of the prior art, below will The required accompanying drawing used in embodiment or description of the prior art is briefly described, it should be apparent that, in describing below Accompanying drawing is only some embodiments described in this specification one or more embodiment, is come for those of ordinary skill in the art Say, without having to pay creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the renewal structural representation for the page static resource that this specification one or more embodiment provides;
Fig. 2 is a kind of flow chart for web page display method that this specification one or more embodiment provides;
Fig. 3 is a kind of flow chart for resource normal call that this specification one or more embodiment provides;
Flow chart when Fig. 4 is a kind of resource transfer mistake that this specification one or more embodiment provides;
Fig. 5 is a kind of structural representation for web page display device that this specification one or more embodiment provides;
Fig. 6 is a kind of structural representation for web page display device that this specification one or more embodiment provides.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in this specification one or more embodiment, Below in conjunction with the accompanying drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment Scheme is clearly and completely described, it is clear that described embodiment is only part of the embodiment, rather than whole realities Apply example.Based on this specification one or more embodiment, those of ordinary skill in the art are not making creative work premise Lower obtained every other embodiment, it should all belong to the scope of disclosure protection.
All built-in Web page in many App, such as the client end AP P of many electric business platforms, are shown using Web page Commodity.This Web page operated in APP is properly termed as the mobile Web page, and the mobile Web page can pass through mobile terminal The loading displaying of WebView components.Wherein, a kind of resource can be included in the mobile Web page is page static resource, for example, with CSS files in setting style sheet, js files for producing page interaction characteristic etc..
In a mobile Web page, the resource file of page static resource can include a variety of files, can have respectively There is different filenames, such as, common.js is a js file, and creditManager.js is another js file, Amui.css is a CSS file, and creditManager.css is another CSS file.The static resource that the page includes The quantity of resource file and name can determine according to practical business demand, and the resource file of each page static resource can be with With it in page presentation corresponding function.
The resource file of page static resource be able to may also update, such as, it is sometimes desirable to update the mobile Web page Pattern and layout, or some trickle adjustment are done to the interaction characteristic of the page, then now just need to change changed page Resource file corresponding to the characteristic of face.For example, it is assumed that some mobile Web page in a mobile terminal APP is to the pattern in the page Upgraded, corresponding, the content in the CSS files that the page uses is updated, and with the addition of the generation of some novel types Code.
Fig. 1 is referred to, Fig. 1 illustrates the more new construction of page static resource.The resource file of static resource can be deposited Storage is in static resource server 11.One mobile Web page 13 of loading displaying, the exhibition of the mobile Web page 13 on mobile terminal 12 The resource file for showing one of static resource that needs load is a.css, for limiting style sheet.
Assuming that the version of the mobile Web page where the current mobile Web page 13 is version 1.0, in the page of version 1.0 During loaded and displayed, mobile terminal can call the resource file a.css stored in the resource address 1 of static resource server 11, and And resource address 1 now can be https://a.b.c.com/manager/1.0/a/a.css, wherein, in resource address 1 1.0 be version number.
Assume that the page of the novel type of above-mentioned mobile Web page issue corresponds to version 2 .0 again, the page of the version 2 .0 pages Face pattern has carried out pattern improvement relative to version 1.0, and the file content in corresponding a.css files is also modified, can be with It is the increase in some new codes for adding pattern.Version 2 .0 a.css files can be stored in static resource server 11 In resource address 2, mobile terminal call resource file when be also that newest a.css files are obtained according to the resource address 2.But Version 2 .0 a.css files are identical with the name of the a.css files of version 1.0.Resource address 2 can be https:// A.b.c.com/manager/2.0/a/a.css, wherein, 2.0 in resource address 2 be version number.
As above it can be seen that, the static resource in the mobile Web page can have multiple different resource address, above-mentioned row The situation of act be due to FileVersion change cause resource address to change, actually implement in or other situations Caused resource address change.But for mobile terminal, under the mechanism of above-mentioned version management, although resource address becomes Change, but the resource called all is the different editions of same resource file, such as, all it is a.css, is this file Address is changed, and the file content of this document is updated, one be version 1.0 a.css files, one is Version 2 .0 a.css files;In other examples, it is also possible to which resource address is there occurs change but in resource file Appearance does not update.
During the loading displaying of the mobile Web page, asked it sometimes appear that static resource server can not be provided normally The static resource of calling is sought, so as to influence the normal use of business function.For example if a mobile Web page was loading Cheng Zhong, the a.css of resource address 2 is called, the reason for being due to some unknown, static resource server can not be returned normally The a.css, so as to cause Web page can not normal presentation, the business function of the page is also affected and is not normally functioning.One As in the case of, when the static resource on invoking server can not be returned normally, user may can be appreciated that no pattern on the page And the inoperable page, and when checking page resource state with developer's instrument, you can see 404 prompting, 404 i.e. generation For table client when browsing webpage or obtaining resource, server can not normally provide information, or server can not be responded and not Know reason.The 404 of invoking page static resource may influence page function normal use.
In order to solve 404 above-mentioned problems, ensure the business function normal operation of the page, Fig. 2 illustrates a kind of webpage exhibition Show method, as shown in Fig. 2 this method can include:
In step 200, when rendering the page to be presented, according to Secondary resource address, obtained to Resource Server request Take the page static resource of the second edition included in the page.
For example, it is assumed that to load a Web page in current mobile terminal APP, it is used to limit comprising some in the Web page Style sheet and the static resource file of interaction.This step can take according to the resource address included in the page to static resource Business device request call obtains the page static resource.
It is exemplary, by taking the a.css in Fig. 1 as an example, it is assumed that it is the version 2 .0 page corresponding to current Web page, root According to resource address 2 to server acquisition request a.css.The resource address 2 can be referred to as Secondary resource address, i.e., currently Address corresponding to the static resource of request, version 2 .0 a.css can be referred to as to the page static resource of the second edition.
In step 202, when Resource Server returns to resource acquisition failure, obtain and provided with the page of first version static state First resource address corresponding to source, the first resource address are to determine the page static resource that can provide the first version Address.
For example, due to certain unknown cause, static resource server returns 404, and the a.css of resource address 2 can not be obtained Get.So, this step can obtain first resource address corresponding to the a.css of first version, and the first resource address is What is had determined can stablize the address for providing page static resource a.css, i.e., can be protected substantially by the first resource address Card can get a.css, and the a.css only got can be another version.For example the first resource address can be with It is the resource address 1 in Fig. 1, or the unshowned resource address of other Fig. 1.Furthermore, it is necessary to illustrate, in this example " second " or " first " being related to, it is intended merely to distinguish different resource address, or it is static in order to distinguish the same page The different editions of resource, and do not have other restriction effects.
In step 204, according to first resource address, to the static money of the page of Resource Server acquisition request first version Source.
In this step, mobile terminal can be according to first resource address, to Resource Server acquisition request page static resource. For example when the resource address 1 in by Fig. 1 can not get a.css, a.css can be obtained according to resource address 1 again.
In step 206, receive and load the page static resource of the first version of the Resource Server feedback, To render and show the page.
The address of the page static resource can be provided because first resource address is to determine, so mobile terminal now may be used To receive for example above-mentioned a.css of static resource of static resource server return, and loaded and displayed, so as to normally show Web The page.
The web page display method of this example, by when server returns to resource acquisition and failed, passing through first resource address The resource is asked to server, ensure that the static resource that can get the page so that the business function of the page can be normal Operation.Although according to first resource address, it is possible to the text the to be obtained when resource file for causing to return not is first request Part, such as, the file of the two addresses has the difference on some style sheets, and still, the method for this example can be to greatest extent Guarantee business function normal operation, sometimes page function normally will be more important relative to the renewal of style sheet.
The above-mentioned process that 404 situations are prevented by first resource address is described in detail with an example again as follows.Wherein, The mobile Web page can load displaying by WebView components, and the WebView can regard loaded and displayed webpage as Browser.The WebView can include Web Engine WebCore and WebViewClient, wherein, webcore can be located at The module of the responsible analyzing web page of bottom (C/C++ layers), WebViewClient can be responsible the holding positioned at upper strata (Java layers) The module of some call requests of row, when WebCore is needing to call some resources during parsing the page, can be notified WebViewClient goes to obtain these resources.WebCore, WebViewClient and static resource server can be described below Interaction, illustrate how loading one mobile Web page of displaying come business function failure caused by overcoming 404.It is divided into resource just Often obtain when normal call flow and occur 404 when resource acquisition protection flow.
Normal call flow when the resource that Fig. 3 illustrates an example normally obtains, can include:
In step 300, WebCore notifies request static resource to WebViewClient, and it is quiet to carry the asked page The resource identification of state resource.
In this step, WebCore is when parsing Web page, can be with when needing the static resource in the acquisition request page Notice WebViewClient is gone to obtain the resource, and resource address is notified to WebViewClient.
In one example, WebCore can increase the resource identification of the static resource of the request in resource address, can To be referred to as resourcekey.For example, it is assumed that resource address is https://a.b.c.com/manager/1.0/a/a.css, increase After adding resourcekey, the address can be https://a.b.c.com/manager/1.0/a/a.cssresourcekey =a.In this example embodiment, can be using a in the filename a.css of resource file as resourcekey, because different resources File typically has different filenames, and the differentiation to different files can be realized using file name as resourcekey, Realize the unique mark to each resource file of request.It is of course also possible to resource identification is set in other ways.
In step 302, WebViewClient provides according to resource address to the Resource Server acquisition request page is static Source.
For example, WebViewClient can be according to address above mentioned https://a.b.c.com/manager/1.0/a/ a.cssResourcekey=a, remove the resource file a.css of static resource server request static resource.
In step 304, Resource Server normally returns to static resource to WebViewClient.
In this example, Resource Server can successfully return to the page static resource, and WebViewClient accordingly It can also determine, the page static state can stably be provided by asking the resource address of resource institute foundation to be to determine in step 302 The address of resource.
Within step 306, WebViewClient returns to static resource to WebCore.
WebCore can receive the resource file of static resource, and load this document, normally to show the page.
In step 308, WebViewClient obtains the resource identification of static resource.
Because in step 304, WebViewClient has determined that the resource address of request resource institute foundation is to determine energy Enough stable addresses for providing the page static resource, in this step, WebViewClient can obtain the money of the static resource Source identifies.For example, can be by obtaining resource identification in resource address, address https://a.b.c.com/manager/1.0/ a/a.cssResource identification resourcekey=a can be obtained in resourcekey=a.
In the step 310, WebViewClient stores the corresponding relation of resource identification and resource address to local slow Deposit.
For example, the corresponding relation of WebViewClient storages can be:
a——https://a.b.c.com/manager/1.0/a/a.cssResourcekey=a
Above-mentioned corresponding relation shows, is a page static resource for resourcekey, can stablize and provide the resource One of resource address be https://a.b.c.com/manager/1.0/a/a.cssResourcekey=a.
Flow shown in above-mentioned Fig. 3, can be by resource and its stable money in the case where server normally returns to resource The corresponding relation of source address is stored in local cache, in case the flow of subsequent figure 4 uses.Wherein, when mobile terminal repeatedly parses page During face, for example user repeatedly opens APP, to show the page, may repeatedly ask the page static resource of the page, still Local cache can store a corresponding relation.
Fig. 4 illustrates the protection flow occurred when request static resource returns to 404 error code of an example, the Fig. 4's Flow can use the corresponding relation to Fig. 3 storages, wherein, can be by the corresponding relation of storage in the example shown in Fig. 3 Resource address https://a.b.c.com/manager/1.0/a/a.cssResourcekey=a is with being referred to as first resource Location, the resource normally returned can be referred to as to the page static resource of first version.As shown in figure 4, the method for this example can be with Including:
In step 400, WebCore notifies request static resource to WebViewClient, and it is quiet to carry the asked page The resource identification of state resource.
In this step, WebCore is when parsing Web page, can be with when needing the static resource in the acquisition request page Notice WebViewClient is gone to obtain the resource, and resource address is notified to WebViewClient.Resource in the step Address is properly termed as Secondary resource address, for example, the Secondary resource address can be https://a.b.c.com/manager/ 2.0/a/a.cssResourcekey=a, i.e., the Secondary resource address is address corresponding to the Web page of 2.0 versions, and preceding The first resource address in face is 1.0 versions.
In step 402, WebViewClient is according to Secondary resource address, to the Resource Server acquisition request second edition This page static resource.
For example, WebViewClient can be according to address above mentioned https://a.b.c.com/manager/2.0/a/ a.cssResourcekey=a, remove the resource file a.css of static resource server request static resource.Only this A.css is that the a.css obtained in the a.css of the second edition, with Fig. 3 examples can not be same version, such as specific sample Formula has carried out some changes.
In step 404, Resource Server returns to 404 to WebViewClient.
In this example, Resource Server may not find the page static resource.
In a step 406, WebViewClient in Secondary resource address by obtaining resource identification.
For example, can be by https://a.b.c.com/manager/2.0/a/a.cssIn resourcekey=a, obtain Get resource identification resourcekey=a.
In a step 408, WebViewClient is according to resource identification, the first resource as corresponding to obtaining local cache Location.
In this step, because the page static resource of the second edition and the page static resource of first version correspond to same money Source identifies, such as, resourcekey is a, and WebViewClient can be corresponding to local cache acquisition request Resourcekey first resource address.
In step 410, WebViewClient receives the first resource address that local cache returns.
For example, the first resource address can be the ground in the corresponding relation stored in Fig. 3 flows, https:// a.b.c.com/manager/1.0/a/a.cssResourcekey=a.It can be the address of 1.0 versions.
In step 412, WebViewClient is according to first resource address, to page described in Resource Server acquisition request Face static resource.
In step 414, WebViewClient receives the resource file of server return.
The address that resource is provided can be stablized because first resource address is to determine, so WebViewClient is in basis During first resource Address requests resource, the resource file can be got.Such as when (the second money of resource address 2 in Fig. 1 Source address) obtain less than resource file when, resource file can be got in resource address 1 (first resource address) because should Address had normally returned to the address of resource before being.
In step 416, resource file is returned to WebCore by WebViewClient.
In this step, resource file is returned to WebCore by WebViewClient, and such WebCore can load static state Resource, page function can be with normal operations.
In addition, WebViewClient, which may call upon daily record, reports interface, warning message is reported, to notify developer Check the problem of Secondary resource address acquisition is less than resource file.
The web page display method of this example, by when server returns to resource acquisition and failed, passing through first resource address The resource is asked to server, ensure that the static resource that can get the page so that the business function of the page can be normal Operation.
In order to realize above-mentioned method, this specification one or more embodiment additionally provides a kind of web page display device, As shown in figure 5, the device can include:Resource request module 51, address acquisition module 52, re-request module 53 and resource connect Receive module 54.
Resource request module 51, for when rendering the page to be presented, according to Secondary resource address, to Resource Server The page static resource of the second edition included in the page described in acquisition request;
Address acquisition module 52, for when the Resource Server return resource acquisition failure when, obtain and first version The page static resource corresponding to first resource address, the first resource address is determined to provide the first version Page static resource;
Re-request module 53, for according to the first resource address, to described in the Resource Server acquisition request The page static resource of first version;
Resource receiving module 54, the static money of the page of the first version for receiving and loading the Resource Server feedback Source, to render and show the page.
In one example, as shown in fig. 6, the device also includes address memory module 55.
Resource request module 51, be additionally operable to according to Secondary resource address to the Resource Server acquisition request second edition It is static to the page of Resource Server acquisition request first version according to first resource address before page static resource Resource;
Address memory module 55, for when the Resource Server successfully returns to the page static resource, it is determined that The first resource address is to determine the address for the page static resource for providing first version, stores the static money of the page The resource identification in source and the corresponding relation of the first resource address.
In one example, resource request module 51, it is additionally operable to as resource mark corresponding to the page static resource allocation Know, and the resource identification is arranged in the first resource address;
The address memory module 55, specifically for by obtaining the resource identification in the first resource address, storing The corresponding relation of resource identification and the first resource address.
In one example, address memory module 55, specifically for by the resource identification of the page static resource and The corresponding relation of one resource address, is stored in local cache.
In one example, address acquisition module 52, for by obtaining the resource identification in the Secondary resource address, The resource identification of the page static resource is carried in the Secondary resource address;And according to the resource identification, acquisition and institute State the first resource address corresponding to resource identification;The page static resource of the second edition and the page of first version Face static resource corresponds to the same resource identification.
For convenience of description, it is divided into various modules during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each module can be realized in same or multiple softwares and/or hardware during specification one or more embodiment.
Each step in flow shown in above method embodiment, its execution sequence are not restricted to the order in flow chart. In addition, the description of each step, it is possible to achieve be software, hardware or its form combined, for example, those skilled in the art can Can be that the computer that can realize logic function corresponding to the step can perform in the form of implementing these as software code Instruction.When it is realized in a manner of software, described executable instruction can store in memory, and by the place in equipment Device is managed to perform.
For example, corresponding to above-mentioned web page display method, this specification one or more embodiment provides a kind of webpage simultaneously Presentation device, the meter that the equipment can include processor, memory and storage on a memory and can run on a processor Calculation machine instructs, and the processor is by performing the instruction, for realizing following steps:When rendering the page to be presented, root According to Secondary resource address, to the page static resource of the Resource Server acquisition request second edition;When the Resource Server returns When returning resource acquisition failure, acquisition first resource address corresponding with the page static resource of first version, described first Resource address is to determine the address for the page static resource for providing the first version;According to the first resource address, Xiang Zi The page static resource of source server acquisition request first version;Receive and load the described of the Resource Server feedback The page static resource of first version, to render and show the page.
The device or module that above-described embodiment illustrates, can specifically be realized by computer chip or entity, or by with The product of certain function is realized.One kind typically realizes that equipment is computer, and the concrete form of computer can be personal meter Calculation machine, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media player, navigation are set It is any several in standby, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment The combination of equipment.
It should be understood by those skilled in the art that, this specification one or more embodiment can be provided as method, system or Computer program product.Therefore, this specification one or more embodiment can use complete hardware embodiment, complete software to implement The form of embodiment in terms of example or combination software and hardware.Moreover, this specification one or more embodiment can be used one Individual or multiple computer-usable storage mediums for wherein including computer usable program code (include but is not limited to disk storage Device, CD-ROM, optical memory etc.) on the form of computer program product implemented.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Other identical element also be present in the process of element, method, commodity or equipment.
This specification one or more embodiment can computer executable instructions it is general on Described in hereafter, such as program module.Usually, program module includes performing particular task or realizes particular abstract data type Routine, program, object, component, data structure etc..Can also put into practice in a distributed computing environment this specification one or Multiple embodiments, in these DCEs, by being performed by communication network and connected remote processing devices Task.In a distributed computing environment, the local and remote computer that program module can be located at including storage device is deposited In storage media.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for service end For apparatus embodiments, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to method The part explanation of embodiment.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the order in embodiment Perform and still can realize desired result.In addition, the process described in the accompanying drawings not necessarily require show it is specific suitable Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can With or be probably favourable.
The preferred embodiment of this specification one or more embodiment is the foregoing is only, not limiting this public affairs Open, it is all within the spirit and principle of the disclosure, any modification, equivalent substitution and improvements done etc., it should be included in the disclosure Within the scope of protection.

Claims (12)

1. a kind of web page display method, methods described include:
When rendering the page to be presented, according to Secondary resource address, included into the page described in Resource Server acquisition request The second edition page static resource;
When the Resource Server returns to resource acquisition failure, obtain corresponding with the page static resource of first version First resource address, the first resource address are determined to provide the page static resource of the first version;
According to the first resource address, to the page static resource of first version described in the Resource Server acquisition request;
Receive and load the page static resource of the first version of the Resource Server feedback, it is described to render and show The page.
2. according to the method for claim 1, in the page according to Secondary resource address to Resource Server acquisition request In before the page static resource of the second edition that includes, methods described also includes:
According to the first resource address, to the page static resource of first version described in the Resource Server acquisition request;
If the Resource Server successfully returns to the page static resource of the first version, it is determined that the first resource address The address for the page static resource that the first version is provided is to determine, stores resource identification and the institute of the page static resource State the corresponding relation of first resource address.
3. according to the method for claim 2,
It is described according to the first resource address, to the page static resource of first version described in Resource Server acquisition request, Also include before:For resource identification corresponding to the page static resource allocation, the page static resource of the second edition and The page static resource of first version corresponds to the same resource identification, and the resource identification is arranged on into described first In resource address;
The resource identification of the storage page static resource and the corresponding relation of the first resource address, including:By institute State and the resource identification is obtained in first resource address, store the corresponding relation of resource identification and the first resource address.
4. the method according to claim 11, the resource identification and the first resource of the memory page static resource The corresponding relation of location, including:By the resource identification of the page static resource and the corresponding relation of first resource address, it is stored in Local cache.
5. the resource mark of the page static resource according to the method for claim 1, is carried in the Secondary resource address Know;The page static resource of the second edition and the page static resource of first version correspond to the same resource mark Know;
It is described to obtain corresponding with page static resource first resource address, including:
By obtaining the resource identification in the Secondary resource address;
According to the resource identification, the first resource address corresponding with the resource identification is obtained.
6. a kind of web page display method, methods described include:
According to first resource address, to the page static resource of the first version of the Resource Server acquisition request page to be presented;
Receive the page static resource for the first version that the Resource Server successfully returns;
Store the resource identification of the page static resource and the corresponding relation of the first resource address;
It is quiet to the page of the second edition of the Resource Server acquisition request page to be presented according to Secondary resource address State resource;
When the Resource Server returns to resource acquisition failure, according to the resource identification of the page static resource, by storing The corresponding relation in obtain corresponding with the resource identification first resource address;
According to the page static resource of first version described in the first resource address acquisition;
Receive and load the page static resource of the first version of the Resource Server feedback, it is described to render and show The page.
7. a kind of web page display device, described device include:
Resource request module, for when rendering the page to be presented, according to Secondary resource address, being obtained to Resource Server request Take the page static resource of the second edition included in the page;
Address acquisition module, for when the Resource Server returns to resource acquisition failure, obtaining described with first version First resource address corresponding to page static resource, the first resource address are determined to provide the page of the first version Static resource;
Re-request module, for according to the first resource address, to the first edition described in the Resource Server acquisition request This page static resource;
Resource receiving module, the static money of the page of the first version for receiving and loading the Resource Server feedback Source, to render and show the page.
8. device according to claim 7,
The resource request module, it is additionally operable in the page according to Secondary resource address to the Resource Server acquisition request second edition It is quiet to the page of Resource Server acquisition request first version according to the first resource address before the static resource of face State resource;
Described device also includes:Address memory module, for successfully returning to the page static resource in the Resource Server When, it is determined that the first resource address is to determine the address for the page static resource for providing first version, described in storage The resource identification of page static resource and the corresponding relation of the first resource address.
9. device according to claim 8,
The resource request module, it is additionally operable to as resource identification corresponding to the page static resource allocation, and by the resource Mark is arranged in the first resource address;
The address memory module, specifically for by obtaining the resource identification in the first resource address, storing the money Source identifies and the corresponding relation of first resource address.
10. device according to claim 8,
The address memory module, specifically for by the correspondence of the resource identification of the page static resource and first resource address Relation, it is stored in local cache.
11. device according to claim 7,
The address acquisition module, for by obtaining the resource identification in the Secondary resource address, the Secondary resource The resource identification of the page static resource is carried in location;And according to the resource identification, obtain corresponding with the resource identification The first resource address;The page static resource of the second edition and the page static resource of first version are corresponding The same resource identification.
12. a kind of web page display equipment, the equipment includes memory, processor, and stores on a memory and can locate The computer instruction run on reason device, the computing device realize following steps when instructing:
When rendering the page to be presented, according to Secondary resource address, included into the page described in Resource Server acquisition request The second edition page static resource;
When the Resource Server returns to resource acquisition failure, obtain corresponding with the page static resource of first version First resource address, the first resource address are determined to provide the page static resource of the first version;
According to the first resource address, to the page static resource of first version described in the Resource Server acquisition request;
Receive and load the page static resource of the first version of the Resource Server feedback, it is described to render and show The page.
CN201710976978.5A 2017-10-19 2017-10-19 Webpage display method and device Active CN107748689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710976978.5A CN107748689B (en) 2017-10-19 2017-10-19 Webpage display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710976978.5A CN107748689B (en) 2017-10-19 2017-10-19 Webpage display method and device

Publications (2)

Publication Number Publication Date
CN107748689A true CN107748689A (en) 2018-03-02
CN107748689B CN107748689B (en) 2020-11-10

Family

ID=61252988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710976978.5A Active CN107748689B (en) 2017-10-19 2017-10-19 Webpage display method and device

Country Status (1)

Country Link
CN (1) CN107748689B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110244975A (en) * 2018-03-08 2019-09-17 北京京东尚科信息技术有限公司 A kind of generation method and device of static resource version number
CN111931111A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Webpage development method, webpage display method, device and equipment
CN112016014A (en) * 2020-08-18 2020-12-01 北京达佳互联信息技术有限公司 Webpage display method, webpage resource generation method, webpage display device, webpage resource generation device, electronic equipment and medium
CN113778707A (en) * 2021-08-24 2021-12-10 北京达佳互联信息技术有限公司 Front-end frame loading method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942225A (en) * 2013-01-23 2014-07-23 阿里巴巴集团控股有限公司 Method and system for invoking resources of Hybrid App client and client
CN104965717A (en) * 2014-06-05 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for loading page
CN105516261A (en) * 2015-11-26 2016-04-20 深圳市深信服电子科技有限公司 Web page loading control method and load balancer
CN105630981A (en) * 2015-12-25 2016-06-01 小米科技有限责任公司 Network resource loading and configuration method and device
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN106095999A (en) * 2016-06-22 2016-11-09 腾讯科技(深圳)有限公司 Obtain the method and device of content of pages
CN106209925A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 Page loading method, client and system
CN106293675A (en) * 2015-06-08 2017-01-04 腾讯科技(深圳)有限公司 Static system resource loading method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942225A (en) * 2013-01-23 2014-07-23 阿里巴巴集团控股有限公司 Method and system for invoking resources of Hybrid App client and client
CN104965717A (en) * 2014-06-05 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for loading page
CN105760405A (en) * 2014-12-19 2016-07-13 阿里巴巴集团控股有限公司 Methods and devices for obtaining network resource for loading web page and method and device for caching network resource
CN106209925A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 Page loading method, client and system
CN106293675A (en) * 2015-06-08 2017-01-04 腾讯科技(深圳)有限公司 Static system resource loading method and device
CN105516261A (en) * 2015-11-26 2016-04-20 深圳市深信服电子科技有限公司 Web page loading control method and load balancer
CN105630981A (en) * 2015-12-25 2016-06-01 小米科技有限责任公司 Network resource loading and configuration method and device
CN106095999A (en) * 2016-06-22 2016-11-09 腾讯科技(深圳)有限公司 Obtain the method and device of content of pages

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110244975A (en) * 2018-03-08 2019-09-17 北京京东尚科信息技术有限公司 A kind of generation method and device of static resource version number
CN111931111A (en) * 2020-08-14 2020-11-13 工银科技有限公司 Webpage development method, webpage display method, device and equipment
CN112016014A (en) * 2020-08-18 2020-12-01 北京达佳互联信息技术有限公司 Webpage display method, webpage resource generation method, webpage display device, webpage resource generation device, electronic equipment and medium
CN112016014B (en) * 2020-08-18 2023-12-26 北京达佳互联信息技术有限公司 Webpage display method, webpage resource generation device, electronic equipment and medium
CN113778707A (en) * 2021-08-24 2021-12-10 北京达佳互联信息技术有限公司 Front-end frame loading method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN107748689B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN110019279B (en) Online document collaborative updating method, device, equipment and storage medium
CN107748689A (en) A kind of web page display method and apparatus
CA2831381C (en) Recovery of tenant data across tenant moves
CN105787077A (en) Data synchronizing method and device
CN108334562A (en) A kind of page display method and device
CN104115142B (en) For the file specific to equipment of bookmark synchronization
CN110119294A (en) The generation method of menu page, apparatus and system
CN108415963A (en) A kind of page generation method and device
CN112867988A (en) Implementing compliance settings by a mobile device to follow a configuration scenario
CN109471626B (en) Page logic structure, page generation method, page data processing method and device
JP2015510644A (en) Sub-device discovery and management
JP2021509498A (en) Computing device
CN105631035A (en) Data storage method and device
CN108470054A (en) A kind of data access method and system
CN107678789A (en) The update method and device at UI interfaces
CN106648569A (en) Target serialization achieving method and device
CN110489158B (en) Method, device, medium and electronic equipment for optimizing code hosting platform
CN111159040A (en) Test data generation method, device, equipment and storage medium
US20150280996A1 (en) Cloud topology visualizations
CN112905486B (en) Service integration test method, device and system
JP2021515304A (en) Methods, computer programs, and equipment for post-failure recovery using checkpoints in key-value stores in a time-series log structure in the system.
CN104221002B (en) For realizing the method and system for the public data interface for arriving web services
CN112035396B (en) Processor-implemented method, system, and storage medium for provisioning a set of solutions
CN110018761A (en) To the method, apparatus and terminal being managed recently using file
US10579722B1 (en) Structured metadata for dynamic data encapsulation

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1249236

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant