CN109522500A - Webpage display process, device, terminal and storage medium - Google Patents

Webpage display process, device, terminal and storage medium Download PDF

Info

Publication number
CN109522500A
CN109522500A CN201811415503.XA CN201811415503A CN109522500A CN 109522500 A CN109522500 A CN 109522500A CN 201811415503 A CN201811415503 A CN 201811415503A CN 109522500 A CN109522500 A CN 109522500A
Authority
CN
China
Prior art keywords
webview
webpage
visited
list
control
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
CN201811415503.XA
Other languages
Chinese (zh)
Other versions
CN109522500B (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.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software Technology 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 Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN201811415503.XA priority Critical patent/CN109522500B/en
Publication of CN109522500A publication Critical patent/CN109522500A/en
Application granted granted Critical
Publication of CN109522500B publication Critical patent/CN109522500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of Webpage display process, device, terminal and storage mediums.This method comprises: obtaining the uniform resource locator of webpage to be visited;According to the uniform resource locator and preconfigured WebView control configuration information of the webpage to be visited, the target WebView control for opening the webpage to be visited is determined;The webpage to be visited is shown and rendered according to the target WebView control.The embodiment of the present invention is by being pre-configured with WebView control configuration information, the WebView control for loading webpage to be visited can be dynamically determined when loading webpage, WebView control that is more stable and being more suitable for webpage to be visited is utilized webpage to be visited is shown and rendered, and the flexible switching of WebView control provides foundation when loading abnormal for webpage, improves the display efficiency and performance of webpage in terminal.

Description

Webpage display process, device, terminal and storage medium
Technical field
The present embodiments relate to Internet technical field more particularly to a kind of Webpage display process, device, terminal and deposit Storage media.
Background technique
With the fast development of Internet technology, more and more fields provide browsing webpage for user, correspondingly, more next More users browses webpage using terminal, and the acquisition and interaction of the operation and information to webpage are realized with this.However, Since the use habit and use environment of user are different, system is integrated in the model of terminal used by different user, terminal There are diversity for the running environment such as the version of APP used in the version and terminal of system, and then same webpage is at different ends The compatibility shown on end is poor, leads to the abnormal show of webpage.
In the prior art, each webpage is targetedly developed, that is, same webpage is directed to, to it in difference The display mode of running environment is developed, that is, determines WebView control of the same webpage under different running environment.With this according to The corresponding WebView control of institute's webpage to be loaded is determined according to running environment, and webpage is loaded and shown with this, improves net Display effect of the page in different terminals.
However, the development amount of the prior art is huge, then lack of competence be directed to the webpage developed for third party Property exploitation, and when webpage load solution can not be provided immediately when something goes wrong, reduce webpage in terminal display effect Rate and performance.
Summary of the invention
The embodiment of the invention provides a kind of Webpage display process, device, terminal and storage medium, it can be dynamically determined and add The WebView control of webpage to be visited is carried, the display efficiency and performance of webpage in terminal are improved.
In a first aspect, the embodiment of the invention provides a kind of Webpage display process, comprising:
Obtain the uniform resource locator of webpage to be visited;
According to the uniform resource locator and preconfigured WebView control configuration information of the webpage to be visited, really Surely the target WebView control of the webpage to be visited is opened;
The webpage to be visited is shown and rendered according to the target WebView control.
Second aspect, the embodiment of the invention provides a kind of Web page display apparatus, comprising:
URL obtains module, for obtaining the uniform resource locator of webpage to be visited;
Target widget determining module, for uniform resource locator according to the webpage to be visited and preconfigured WebView control configuration information determines the target WebView control for opening the webpage to be visited;
Web displaying module, for carrying out display and wash with watercolours to the webpage to be visited according to the target WebView control Dye.
The third aspect, the embodiment of the invention provides a kind of terminals, comprising:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes Webpage display process described in any embodiment of that present invention.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence realizes Webpage display process described in any embodiment of that present invention when the program is executed by processor.
The embodiment of the present invention is before opening webpage to be visited, by obtaining the uniform resource locator of webpage to be visited, According to the uniform resource locator and preconfigured WebView control configuration information of webpage to be visited, determine that opening is to be visited The target WebView control of webpage, so that webpage to be visited is shown and be rendered using target WebView control.This hair Bright embodiment can be dynamically determined when loading webpage and load wait visit by being pre-configured with to WebView control configuration information The WebView control for asking webpage, be utilized WebView control that is more stable and being more suitable for webpage to be visited to webpage to be visited into Flexible switch of WebView control provides foundation when going and show and render, and loading abnormal for webpage, improves webpage in terminal Display efficiency and performance.
Detailed description of the invention
Fig. 1 is a kind of flow chart for Webpage display process that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of Webpage display process provided by Embodiment 2 of the present invention;
Fig. 3 is the flow chart of determining target WebView control provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of structural schematic diagram for Web page display apparatus that the embodiment of the present invention three provides;
Fig. 5 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.
Specific embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this Locate described specific embodiment and is used only for explaining the embodiment of the present invention, rather than limitation of the invention.It further needs exist for Bright, only parts related to embodiments of the present invention are shown for ease of description, in attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart of a kind of Webpage display process that the embodiment of the present invention one provides, and the present embodiment is applicable to pair The case where webpage is shown, this method can be executed by a kind of Web page display apparatus.The web displaying side of the embodiment of the present invention Method and Web page display apparatus can run on mobile phone, tablet computer and computer etc. and can browse through in the terminal of webpage, mobile phone etc. Android system or apple system can be installed, being equipped with Windows etc. in the terminals such as computer, other are in mobile terminal System, and browser or application program for being browsed to webpage can be installed in mobile terminal or terminal.Wherein, this reality Example is applied not limit the version of the model of mobile terminal or terminal, the version of installation system and installation application program.It should Method specifically comprises the following steps:
Step 110, the uniform resource locator for obtaining webpage to be visited.
In the specific embodiment of the invention, webpage to be visited, which can refer to, will be opened but still not shown webpage, can be with It is to be also possible to jump meaning according between the page caused by page function by browsing webpage pointed by user's clicking operation To webpage etc., webpage to be visited can be originated from browser or APP etc..Uniform resource locator (Uniform Resource Locator, URL) refer in internet to the unique address of standard resource configuration.Correspondingly, before webpage to be visited opening The URL of webpage to be visited can be obtained.
Step 120, the uniform resource locator according to webpage to be visited and preconfigured WebView control match confidence Breath determines the target WebView control for opening webpage to be visited.
In the specific embodiment of the invention, WebView control is to refer to that the webpage of load is rendered and shown Control can make webpage easily be embedded into APP, can also directly use HTML as page layout, with The scripting languages such as JavaScript mutually call, and realize the rendering and display of webpage.According to pacifying in different terminal models, terminal The different editions that application program is installed in the different editions and terminal of dress system, there are it is various be corresponding to it is mutually applicable The selection of WebView control, therefore the running environment according to webpage, WebView control is especially heavy for the display effect of webpage It wants.
In the present embodiment, in order to reduce the workload of webpage development, avoid carrying out webpage same under different running environment Targetedly a large amount of exploitations, are selected as each APP and are provided with WebView control configuration information in advance, be used to indicate webpage institute The WebView control that the WebView control and APP for being applicable in or being not suitable for are applicable in current operating environment.Specifically, institute Stating WebView control configuration information includes the WebView control column supported under white list, blacklist and current operating environment Table;Wherein, at least one uniform resource locator is each equipped in white and black list, and at least one unified money with this The associated WebView list of controls of source finger URL.It is understood that the WebView control supported under current operating environment Include at least one WebView control in list, refers to that APP is run in current terminal models, system version and APP version etc. Under environment, the WebView control that is applicable in.It include the corresponding URL and WebView control column of at least one webpage in white list Table is used to indicate the WebView control that the webpage is applicable in.In blacklist include the corresponding URL of at least one webpage and WebView list of controls is used to indicate the WebView control that the webpage is not suitable for.Wherein, it is applicable in and refers to that the WebView is controlled Part can normally show associated webpage, not applicable to refer to that the WebView control has more the display of associated webpage Serious exception.
In the present embodiment, WebView list of controls associated for URL in white list and current operating environment is lower is propped up The WebView list of controls held can be ranked up the exhibit stabilization of webpage according to each WebView control, according to aobvious Show that each WebView control is arranged in WebView list of controls by stability from high to low.It is closed conversely, for URL in blacklist Each WebView control can be arranged in WebView control from low to high according to exhibit stabilization by the WebView list of controls of connection In part list.Wherein it is possible to by the integrality of web displaying, the normality of webpage layout, the abnormal conditions of web displaying with And the indexs such as user feedback or information determine the exhibit stabilization of each WebView control.To determine webpage to be visited During target WebView control, the invalid matching of all WebView controls in WebView list of controls is avoided, according to WebView control puts in order in WebView list of controls, according to first successful match or unsuccessful WebView control Subsequent determining operation is carried out, the determination efficiency of target WebView control is improved.
In the present embodiment, the WebView control configuration information of all kinds of APP can be pre-stored in server, thus Terminal can choose suitable opportunity to server transmission network request, to obtain the WebView control for the APP that server issues Configuration information normally shows the webpage in APP with ensureing.Illustratively, the present embodiment can be in the installation for the first time of APP And the acquisition of WebView control configuration information is carried out when using, WebView control can be carried out when APP updates and uses match The acquisition of confidence breath in real time or periodically can also obtain WebView control configuration information in the use process of user It takes, to ensure that the WebView control configuration information configured in terminal is accurately.To the URL according to webpage to be visited With WebView control configuration information preconfigured in terminal, the target WebView control for opening webpage to be visited is determined.
Specifically, the present embodiment is directed to the webpage to be visited of APP, firstly, passing through the white of the URL and APP of webpage to be visited List is matched, to determine whether there is the applicable WebView control of webpage to be visited.
If there are the URL of webpage to be visited in white list, pass through the applicable WebView control of webpage to be visited in white list The WebView list of controls supported under part list and current operating environment is matched, and successively determines that these are applicable with this WebView control whether there is in the WebView list of controls that APP itself is applicable in.If it exists, then according to WebView control Each WebView control puts in order in list, the head in WebView list of controls that webpage to be visited in white list is applicable in A WebView control with the WebView list of controls successful match supported under current operating environment is determined as opening wait visit Ask the target WebView control of webpage.Otherwise, if in white list in the applicable WebView list of controls of webpage to be visited WebView control is not present in the WebView list of controls supported under current operating environment, then can be directly selected First WebView control in the WebView list of controls that APP is supported under current operating environment is determined as opening wait visit Ask the target WebView control of webpage.
Secondly, can not directly determine what webpage to be visited was applicable in if the URL of webpage to be visited is not present in white list WebView control.Therefore the present embodiment is matched by the blacklist of the URL and APP of webpage to be visited, to determine whether to deposit In the WebView control that webpage to be visited is not suitable for.
If there are the URL of webpage to be visited in blacklist, by controlling the WebView supported under current operating environment Part list is matched with the WebView list of controls that webpage to be visited in blacklist is not suitable for, and successively determines APP itself with this Applicable WebView control whether there is in blacklist.If the WebView control that APP itself is applicable in is not present in blacklist In, then it selects first in the WebView list of controls supported under current operating environment not control with the matched WebView of blacklist Part is determined directly as opening the target WebView control of webpage to be visited.If the WebView control that APP itself is applicable in is present in In blacklist, then the WebView control is excluded.Further, if the WebView control that APP itself is applicable in be all present in it is black In list, then webpage to be visited is not shown, or display blank page.
Finally, if the URL of webpage to be visited was both not present in white list, situation about being also not present in blacklist, then First in the WebView list of controls supported under current operating environment WebView control is directly selected to be determined as opening The target WebView control of webpage to be visited.
Step 130 is shown and is rendered to webpage to be visited according to target WebView control.
In the specific embodiment of the invention, since target WebView control is to be suitable for webpage to be visited by judgement to show The control shown, therefore directly webpage to be visited is shown and rendered using target WebView control, it is ensured that net to be visited The normal display of page.The normal display according to different running environment, to same webpage is realized, ensure that web displaying to be visited The integrality of content, the reasonability for showing contents and distribution etc. avoid the occurrence of and show that the displays such as content is imperfect or is laid out entanglement are different Reason condition.
The present embodiment can also be according to the display effect of webpage to be visited, to net to be visited in white list and/or blacklist The associated WebView list of controls of uniform resource locator of page is updated.Illustratively, when some webpage is at some Under the rendering of WebView control can most stable loaded and displayed when, which can be added to the net in white list In the associated WebView list of controls of URL of page, preferentially to be shown using the WebView control to the webpage;When some When webpage more serious abnormal conditions occurs under the rendering of some WebView control, which can be added Into blacklist in the associated WebView list of controls of the URL of the webpage, to avoid the WebView control is reused to this Webpage is shown.
The technical solution of the present embodiment, before opening webpage to be visited, by the unified resource for obtaining webpage to be visited Finger URL is determined and is opened according to the uniform resource locator and preconfigured WebView control configuration information of webpage to be visited The target WebView control of webpage to be visited, to carry out display and wash with watercolours to webpage to be visited using target WebView control Dye.The embodiment of the present invention can be dynamically determined when loading webpage and add by being pre-configured with to WebView control configuration information WebView control that is more stable and being more suitable for webpage to be visited is utilized to be visited in the WebView control for carrying webpage to be visited Webpage is shown and is rendered, and flexible switch of WebView control provides foundation when loading abnormal for webpage, improves terminal The display efficiency and performance of middle webpage.
Embodiment two
The present embodiment on the basis of the above embodiment 1, provides a preferred embodiment of Webpage display process, WebView control applicatory can be matched.Fig. 2 is a kind of Webpage display process provided by Embodiment 2 of the present invention Flow chart, as shown in Fig. 2, this method comprising the following specific steps
Step 210, the uniform resource locator for obtaining webpage to be visited.
In the specific embodiment of the invention, when starting APP and carrying out web page browsing, can starting situation to APP carry out Detection, with this can when installing and using for the first time of APP, APP it is updated for the first time use when or using in user In journey in real time or periodically, network request is sent to server, to obtain the WebView control configuration for the APP that server issues Information.The WebView control configuration information includes being supported under white list, blacklist and current operating environment WebView list of controls;Wherein, be each equipped at least one uniform resource locator in white and black list, and with this The associated WebView list of controls of at least one uniform resource locator.Thus when user carries out web page browsing, to be visited Webpage obtains the URL of webpage to be visited before opening.
Step 220, the uniform resource locator according to webpage to be visited and preconfigured WebView control match confidence Breath determines the target WebView control for opening webpage to be visited.
In the specific embodiment of the invention, constant current journey is as shown in Figure 3 really for target WebView control.According to net to be visited Preconfigured WebView control configuration information in the URL and terminal of page, by controlling the URL of webpage to be visited and WebView The white list of APP is matched in part configuration information, to determine whether there is the applicable WebView control of webpage to be visited.If There is no the WebView controls that webpage to be visited is applicable in, then by the way that the URL of webpage to be visited and WebView control are matched confidence The blacklist of APP is matched in breath, to determine whether there is the not applicable WebView control of webpage to be visited.Final foundation The associated WebView list of controls of the URL of successful match is transported with APP in WebView control configuration information currently in white list The matching result for the WebView list of controls supported under row environment, or exist according to APP in WebView control configuration information The associated WebView control of URL of successful match in the WebView list of controls and blacklist supported under current operating environment The matching result of list determines the target WebView control for being used to open webpage to be visited.
Specifically, the case where can determining at least five kinds determining target WebView controls: situation one exists in white list The URL to match with the URL of webpage to be visited, and existing in the WebView list of controls supported under current operating environment should WebView control in the associated WebView list of controls of the URL to match;Situation two: exist and net to be visited in white list The URL that the URL of page matches, and match in the WebView list of controls supported under current operating environment there is no this WebView control in the associated WebView list of controls of URL;Situation three: it is not present and webpage to be visited in white list The URL that URL matches, but there is the URL to match with the URL of webpage to be visited in blacklist, and this in blacklist matches The associated WebView list of controls of URL in there are the wholes in the WebView list of controls supported under current operating environment Or part WebView control;Situation four: the URL to match with the URL of webpage to be visited, but blacklist are not present in white list It is middle to there is the URL to match with the URL of webpage to be visited, and the associated WebView control column of URL that this in blacklist matches There is no whole WebView controls in the WebView list of controls supported under current operating environment in table;Situation five: white There is no the URL that the URL with webpage to be visited matches in list, and there is no the URL phases with webpage to be visited in blacklist Matched URL.
Optionally, it is positioned if there is the unified resource to match with the uniform resource locator of webpage to be visited in white list Symbol, then obtain the associated WebView list of controls of the uniform resource locator to match;The unified money that will be matched in white list WebView control in the associated WebView list of controls of source finger URL, respectively with supported under current operating environment WebView control in WebView list of controls is matched;If existing in white list and being supported under current operating environment The WebView control that WebView control in WebView list of controls matches, it is determined that match in white list WebView control is target WebView control.
It in the present embodiment, is matched first by the white list of the URL and APP of webpage to be visited, to determine whether to deposit In the WebView control that webpage to be visited is applicable in.If there is the URL to match with the URL of webpage to be visited in white list, that is, deposit In the URL of webpage to be visited, then the associated WebView list of controls of the URL to match in white list is obtained.By in white list The WebView list of controls supported under the associated WebView list of controls of the URL to match and current operating environment carries out Matching successively determines that these applicable WebView controls whether there is the WebView list of controls being applicable in APP itself with this In.If it exists, i.e. above situation one then puts in order according to each WebView control in WebView list of controls, by white name The WebView supported under first and current operating environment in the associated WebView list of controls of the URL that this in list matches The WebView control of list of controls successful match is determined as opening the target WebView control of webpage to be visited.
Optionally, if there is no the unified resources that the uniform resource locator with webpage to be visited matches to determine in white list Position symbol, then match the uniform resource locator of webpage to be visited with the uniform resource locator in blacklist;If black name There is the uniform resource locator to match with the uniform resource locator of webpage to be visited in list, then obtains phase in blacklist The associated WebView list of controls of the uniform resource locator matched;The WebView control supported under current operating environment is arranged WebView control in table, respectively and in the associated WebView list of controls of the uniform resource locator to match WebView control is matched;By what is be not present in blacklist, the WebView list of controls supported under current operating environment In WebView control, be determined as target WebView control.
In the present embodiment, if there is no the URL that the URL with webpage to be visited matches in white list, by be visited The blacklist of the URL and APP of webpage are matched, to determine whether there is the not applicable WebView control of webpage to be visited.If There is the URL to match with the URL of webpage to be visited in blacklist, that is, there is the URL of webpage to be visited, then obtain in blacklist The associated WebView list of controls of the URL to match.By the WebView list of controls supported under current operating environment with The associated WebView list of controls of the URL that this in blacklist matches is matched, and successively determines what APP itself was applicable in this WebView control whether there is in blacklist.If the WebView control part that APP itself is applicable in is present in blacklist, i.e., Above situation three then excludes existing WebView control, selects the WebView list of controls supported under current operating environment In first be not determined directly as opening the target WebView control of webpage to be visited with the matched WebView control of blacklist.
Optionally, if the WebView control in the WebView list of controls supported under current operating environment all exists In blacklist, then the uniform resource locator to webpage to be visited is forbidden to be loaded and shown.
In the present embodiment, further, if the WebView control that APP itself is applicable in is all present in blacklist, i.e., on The special circumstances of situation three are stated, then webpage to be visited are not shown, or display blank page.
Optionally, if in white list or blacklist there is no with the WebView control supported under current operating environment The WebView control that WebView control in list matches, if there is no the unifications with webpage to be visited in blacklist The uniform resource locator that Resource Locator matches, it is determined that the WebView list of controls supported under current operating environment In any WebView control as target WebView control.
In the present embodiment, according to above-mentioned matching order and logic, if there are the URL of webpage to be visited in white list, but it is white WebView control in the associated WebView list of controls of the URL that this in list matches is not present in current operating environment In lower supported WebView list of controls, i.e. above situation two can then be supported under current operating environment from APP Select any one as target WebView control in WebView list of controls.If there is no webpages to be visited in white list URL, and there are the URL of webpage to be visited in blacklist, but in the WebView list of controls supported under current operating environment WebView control is not present in the associated WebView list of controls of URL that this in blacklist matches, i.e., APP itself is fitted WebView control is not present in blacklist, i.e. above situation four, then can from APP under current operating environment institute Select any one as target WebView control in the WebView list of controls of support.If the URL of webpage to be visited is neither Be present in white list, be also not present in blacklist, is i.e. above situation five, then can from APP under current operating environment institute Select any one as target WebView control in the WebView list of controls of support.Wherein, if all kinds of WebView controls WebView control is arranged according to exhibit stabilization in list, then can select APP under current operating environment between First WebView control in the WebView list of controls supported is determined as being used to open the target of webpage to be visited WebView control.
Illustratively, it is assumed that in WebView control configuration information, white list is as follows:
" http://www.abcd.com ": [WKWebView, X5WebView, AppleWebKit],
" http://www.abcde.com ": [TestWebView, XWebView] };
Assuming that blacklist is as follows in WebView control configuration information:
" http://www.1234.com ": [UIWebView, WKWebView, WebView],
" http://www.12345.com ": [UIWebView, WKWebView, X5WebView, AppleWebKit, WebView],
" http://www.123456.com ": [TestWebView, XWebView] };
Assuming that in WebView control configuration information, the following institute of the WebView list of controls supported under current operating environment Show: [UIWebView, WKWebView, X5WebView, AppleWebKit, WebView].
When the URL of webpage to be visited is http://www.abcd.com, then exist and webpage to be visited in white list The URL that URL matches.Successively and currently by the WebView control in the associated WebView list of controls of the URL to match The WebView list of controls supported under running environment is matched.Wherein, corresponding WebView list of controls in white list In first WebView control be WKWebView, and be present in the WebView list of controls supported under current operating environment In, i.e. above situation one, it is thus determined that WKWebView is target WebView control.
When the URL of webpage to be visited is http://www.abcde.com, then exist and webpage to be visited in white list The URL that matches of URL.By the WebView control in the associated WebView list of controls of the URL to match successively with work as The WebView list of controls supported under preceding running environment is matched.Wherein, the associated WebView control of the URL to match WebView control in part list is not present in the WebView list of controls supported under current operating environment, i.e., above-mentioned Situation two, therefore i.e. by first WebView control in the WebView list of controls supported under current operating environment UIWebView is determined as being used to open the target WebView control of webpage to be visited.
When the URL of webpage to be visited is http://www.1234.com, then it is not present and webpage to be visited in white list The URL that matches of URL, but there is the URL to match with the URL of webpage to be visited in blacklist.It will be under current operating environment The WebView control in WebView list of controls supported successively is arranged with the associated WebView control of the URL to match Table is matched.Wherein, first WebView control is in the WebView list of controls supported under current operating environment UIWebView, and be present in the associated WebView list of controls of URL that this in blacklist matches, then it excludes using control UIWebView.And so on, second WebView control is in the WebView list of controls supported under current operating environment WKWebView, and be present in the associated WebView list of controls of URL that this in blacklist matches, it excludes.Current operation Third WebView control is X5WebView in the WebView list of controls supported under environment, be may be not present in blacklist In in the associated WebView list of controls of the URL to match, i.e. above situation three, it is thus determined that X5WebView is target WebView control.
When the URL of webpage to be visited is http://www.12345.com, then it is not present and net to be visited in white list The URL that the URL of page matches, but there is the URL to match with the URL of webpage to be visited in blacklist.By current operating environment WebView control in lower supported WebView list of controls successively with the associated WebView control of the URL to match List is matched.Wherein, the WebView control in WebView list of controls supported under current operating environment all exists In blacklist in the associated WebView list of controls of the URL to match, i.e. special circumstances of above situation three, therefore not Webpage to be visited is shown, or display blank page.
When the URL of webpage to be visited is http://www.123456.com, then it is not present and net to be visited in white list The URL that the URL of page matches, but there is the URL to match with the URL of webpage to be visited in blacklist.By current operating environment WebView control in lower supported WebView list of controls successively with the associated WebView control of the URL to match List is matched.Wherein, the WebView control in WebView list of controls supported under current operating environment is all not It is present in the associated WebView list of controls of URL that this in blacklist matches, i.e. above situation four, therefore will currently transports First i.e. UIWebView of WebView control in the WebView list of controls supported under row environment is determined as being used to open The target WebView control of webpage to be visited.
When the URL of webpage to be visited is http://www.xxxx.com, then it is not present and webpage to be visited in white list The URL that matches of URL, and there is no the URL that the URL with webpage to be visited matches, i.e. above situation five in blacklist.Cause This determines the i.e. UIWebView of first WebView control in the WebView list of controls supported under current operating environment For the target WebView control for being used to open webpage to be visited.
Step 230 is shown and is rendered to webpage to be visited according to target WebView control.
In the specific embodiment of the invention, since target WebView control is to be suitable for webpage to be visited by judgement to show The control shown, therefore directly webpage to be visited is shown and rendered using target WebView control, it is ensured that net to be visited The normal display of page.The normal display according to different running environment, to same webpage is realized, ensure that web displaying to be visited The integrality of content, the reasonability for showing contents and distribution etc. avoid the occurrence of and show that the displays such as content is imperfect or is laid out entanglement are different Reason condition.
Step 240, according to the display effect of webpage to be visited, to the system of webpage to be visited in white list and/or blacklist The associated WebView list of controls of one Resource Locator is updated.
In the specific embodiment of the invention, when under rendering of some webpage in some WebView control can most it is stable plus When carrying display, in the associated WebView list of controls of URL which can be added to the webpage in white list, Preferentially to be shown using the WebView control to the webpage;When under rendering of some webpage in some WebView control go out Now when more serious abnormal conditions, the URL which can be added to the webpage in blacklist is associated In WebView list of controls, the webpage is shown to avoid the WebView control is reused.Realize to white list and/ Or the associated WebView list of controls of uniform resource locator of webpage to be visited is updated in blacklist.
The technical solution of the present embodiment obtains APP under current operating environment with the network communication with server in advance WebView control configuration information.Correspondingly, before opening webpage to be visited, by obtaining the URL of webpage to be visited, foundation URL the and WebView control configuration information of webpage to be visited, by with the white list in WebView control configuration information, black name The WebView list of controls supported under single and current operating environment carries out the matching of URL and control, determines and opens net to be visited The target WebView control of page, so that webpage to be visited is shown and be rendered using target WebView control.The present invention It is to be visited can be dynamically determined load by being pre-configured with to WebView control configuration information when loading webpage for embodiment The WebView control of webpage, to adapt to the current operating environment of terminal, to be utilized more stable and be more suitable for webpage to be visited WebView control webpage to be visited is shown and is rendered, and for webpage load when abnormal WebView control flexibly cut Offer foundation is provided, the display efficiency and performance of webpage in terminal are improved.
Embodiment three
Fig. 4 is a kind of structural schematic diagram for Web page display apparatus that the embodiment of the present invention three provides, and the present embodiment is applicable In show to webpage the case where, which can realize Webpage display process described in any embodiment of that present invention.The device It specifically includes:
URL obtains module 410, for obtaining the uniform resource locator of webpage to be visited;
Target widget determining module 420 for the uniform resource locator according to the webpage to be visited and is pre-configured with WebView control configuration information, determine the target WebView control for opening the webpage to be visited;
Web displaying module 430, for according to the target WebView control to the webpage to be visited carry out display and Rendering.
Optionally, to include that white list, blacklist and current operating environment are lower propped up the WebView control configuration information The WebView list of controls held;Wherein, the positioning of at least one unified resource is each equipped in the white list and the blacklist Symbol, and with the associated WebView list of controls of at least one described uniform resource locator.
Optionally, the target widget determining module 420 is specifically used for:
If it is fixed to there is the unified resource to match with the uniform resource locator of the webpage to be visited in the white list Position symbol, the then associated WebView list of controls of uniform resource locator to match described in acquisition;
By the WebView control in the associated WebView list of controls of the uniform resource locator to match, respectively It is matched with the WebView control in the WebView list of controls supported under the current operating environment;
If exist in the white list in the WebView list of controls supported under the current operating environment The WebView control that WebView control matches, it is determined that the WebView control to match in the white list is target WebView control.
Optionally, the target widget determining module 420 is specifically used for:
If there is no the unified resources that the uniform resource locator with the webpage to be visited matches in the white list Finger URL, then by the uniform resource locator progress in the uniform resource locator of the webpage to be visited and the blacklist Match;
If it is fixed to there is the unified resource to match with the uniform resource locator of the webpage to be visited in the blacklist Position symbol, the then associated WebView list of controls of uniform resource locator to match described in acquisition;
By the WebView control in the WebView list of controls supported under the current operating environment, respectively with it is described WebView control in the associated WebView list of controls of the uniform resource locator to match is matched;
By what is be not present in the blacklist, in the WebView list of controls supported under the current operating environment WebView control is determined as target WebView control.
Optionally, the target widget determining module 420 is specifically used for:
WebView control in the WebView list of controls that will be supported under the current operating environment, respectively After being matched with the WebView control in the associated WebView list of controls of the uniform resource locator to match, If the WebView control in the WebView list of controls supported under the current operating environment is all present in the black name Dan Zhong then forbids the uniform resource locator to the webpage to be visited to be loaded and shown.
Optionally, if in the white list or the blacklist there is no with supported under the current operating environment The WebView control that WebView control in WebView list of controls matches, if in the blacklist there is no with The uniform resource locator that the uniform resource locator of the webpage to be visited matches, it is determined that under the current operating environment Any WebView control in the WebView list of controls supported is as target WebView control.
Further, described device further includes list update module 440;The list update module 440 is specifically used for:
It is described the webpage to be visited is shown and is rendered according to the target WebView control after, foundation The display effect of the webpage to be visited provides the unified of webpage to be visited described in the white list and/or the blacklist Finger URL associated WebView list of controls in source is updated.
The technical solution of the present embodiment is realized WebView control and is matched by the mutual cooperation between each functional module The acquisition and update of confidence breath, the acquisition of the URL of webpage to be visited, the matching of URL in white list, the matching of URL in blacklist, The matching of WebView control, target WebView control be really in the WebView list of controls supported under current operating environment The functions such as the display and rendering of webpage fixed and to be visited.The embodiment of the present invention passes through to the pre- of WebView control configuration information It first configures, the WebView control for loading webpage to be visited can be dynamically determined when loading webpage, is utilized more stable and more suitable The WebView control for closing webpage to be visited is shown and is rendered to webpage to be visited, and is WebView when webpage load is abnormal The flexible switching of control provides foundation, improves the display efficiency and performance of webpage in terminal.
Example IV
Fig. 5 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.As shown in figure 5, the terminal is specifically wrapped It includes: one or more processors 510, in Fig. 5 by taking a processor 510 as an example;Memory 520, for storing one or more Program, when one or more programs are executed by one or more processors 510, so that one or more processors 510 realize this Webpage display process described in invention any embodiment.Processor 510 and memory 520 can be connected by bus or other modes It connects, in Fig. 5 for being connected by bus.
It is executable to can be used for storing software program, computer as a kind of computer readable storage medium for memory 520 Program and module, if the corresponding program instruction of Webpage display process in the embodiment of the present invention is (for example, WebView control is matched The acquisition and update of confidence breath and the load of the determination of target WebView control and webpage).Processor 510 is deposited by operation Software program, instruction and module in memory 520 are stored up, at the various function application and data of terminal Reason, that is, realize above-mentioned Webpage display process.
Memory 520 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 520 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 520 can be into one Step includes the memory remotely located relative to processor 510, these remote memories can pass through network connection to terminal.On The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Embodiment five
The embodiment of the present invention five also provides a kind of computer readable storage medium, be stored thereon with computer program (or For computer executable instructions), for executing a kind of Webpage display process when which is executed by processor, this method comprises:
Obtain the uniform resource locator of webpage to be visited;
According to the uniform resource locator and preconfigured WebView control configuration information of the webpage to be visited, really Surely the target WebView control of the webpage to be visited is opened;
The webpage to be visited is shown and rendered according to the target WebView control.
Certainly, a kind of computer readable storage medium provided by the embodiment of the present invention, computer executable instructions are not It is limited to method operation as described above, the correlation in Webpage display process provided by any embodiment of the invention can also be performed Operation.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention Embodiment can be realized by software and required common hardware, naturally it is also possible to by hardware realization, but in many cases before Person is more preferably embodiment.Based on this understanding, the technical solution of the embodiment of the present invention is substantially in other words to existing skill The part that art contributes can be embodied in the form of software products, which can store in computer Floppy disk, read-only memory (Read-Only Memory, ROM), random access memory in readable storage medium storing program for executing, such as computer (Random Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are used so that one Computer equipment (can be personal computer, server or the network equipment etc.) executes described in each embodiment of the present invention Method.
It is worth noting that, included each unit and module are only patrolled according to function in the embodiment of above-mentioned apparatus It volume is divided, but is not limited to the above division, as long as corresponding functions can be realized;In addition, each function list The specific name of member is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being implemented by above embodiments to the present invention Example is described in further detail, but the embodiment of the present invention is not limited only to above embodiments, is not departing from structure of the present invention It can also include more other equivalent embodiments in the case where think of, and the scope of the present invention is determined by scope of the appended claims It is fixed.

Claims (10)

1. a kind of Webpage display process characterized by comprising
Obtain the uniform resource locator of webpage to be visited;
According to the uniform resource locator and preconfigured WebView control configuration information of the webpage to be visited, determination is beaten Open the target WebView control of the webpage to be visited;
The webpage to be visited is shown and rendered according to the target WebView control.
2. the method according to claim 1, wherein the WebView control configuration information include white list, it is black The WebView list of controls supported under list and current operating environment;Wherein, in the white list and the blacklist It is controlled configured at least one uniform resource locator, and with the associated WebView of at least one described uniform resource locator Part list.
3. according to the method described in claim 2, it is characterized in that, the unified resource according to the webpage to be visited positions Symbol and preconfigured WebView control configuration information determine the target WebView control for opening the webpage to be visited, packet It includes:
If there is the uniform resource locator to match with the uniform resource locator of the webpage to be visited in the white list, The associated WebView list of controls of uniform resource locator to match described in then obtaining;
By the WebView control in the associated WebView list of controls of the uniform resource locator to match, respectively with institute The WebView control stated in the WebView list of controls supported under current operating environment is matched;
If existing in the white list and the WebView in the WebView list of controls supported under the current operating environment The WebView control that control matches, it is determined that the WebView control to match in the white list is target WebView control Part.
4. according to the method described in claim 2, it is characterized in that, the unified resource according to the webpage to be visited positions Symbol and preconfigured WebView control configuration information determine the target WebView control for opening the webpage to be visited, packet It includes:
If there is no the unified resources that the uniform resource locator with the webpage to be visited matches to position in the white list Symbol, then match the uniform resource locator of the webpage to be visited with the uniform resource locator in the blacklist;
If there is the uniform resource locator to match with the uniform resource locator of the webpage to be visited in the blacklist, The associated WebView list of controls of uniform resource locator to match described in then obtaining;
By the WebView control in the WebView list of controls supported under the current operating environment, respectively with the phase WebView control in the associated WebView list of controls of the uniform resource locator matched is matched;
By what is be not present in the blacklist, in the WebView list of controls supported under the current operating environment WebView control is determined as target WebView control.
5. according to the method described in claim 4, it is characterized in that, will be supported under the current operating environment described WebView control in WebView list of controls, respectively with the associated WebView of the uniform resource locator to match After WebView control in list of controls is matched, further includes:
If the WebView control in the WebView list of controls supported under the current operating environment is all present in described In blacklist, then the uniform resource locator to the webpage to be visited is forbidden to be loaded and shown.
6. the method according to claim 3 or 4, which is characterized in that if not deposited in the white list or the blacklist It is controlled in the WebView to match with the WebView control in the WebView list of controls supported under the current operating environment Part, if there is no the unified resources that the uniform resource locator with the webpage to be visited matches to determine in the blacklist Position symbol, it is determined that any WebView control in the WebView list of controls supported under the current operating environment is as mesh Mark WebView control.
7. according to the method described in claim 2, it is characterized in that, it is described according to the target WebView control to described After webpage to be visited is shown and is rendered, further includes:
According to the display effect of the webpage to be visited, to webpage to be visited described in the white list and/or the blacklist The associated WebView list of controls of uniform resource locator be updated.
8. a kind of Web page display apparatus characterized by comprising
URL obtains module, for obtaining the uniform resource locator of webpage to be visited;
Target widget determining module, for uniform resource locator according to the webpage to be visited and preconfigured WebView control configuration information determines the target WebView control for opening the webpage to be visited;
Web displaying module, for the webpage to be visited to be shown and rendered according to the target WebView control.
9. a kind of terminal characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as Webpage display process of any of claims 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as Webpage display process of any of claims 1-7 is realized when execution.
CN201811415503.XA 2018-11-26 2018-11-26 Webpage display method, device, terminal and storage medium Active CN109522500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811415503.XA CN109522500B (en) 2018-11-26 2018-11-26 Webpage display method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811415503.XA CN109522500B (en) 2018-11-26 2018-11-26 Webpage display method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109522500A true CN109522500A (en) 2019-03-26
CN109522500B CN109522500B (en) 2021-03-09

Family

ID=65793364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811415503.XA Active CN109522500B (en) 2018-11-26 2018-11-26 Webpage display method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109522500B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209973A (en) * 2019-05-24 2019-09-06 厦门美柚信息科技有限公司 A kind of web game loading method and device
CN110442286A (en) * 2019-07-29 2019-11-12 北京奇艺世纪科技有限公司 A kind of page display method, device and electronic equipment
CN110929205A (en) * 2019-11-13 2020-03-27 贝壳技术有限公司 Method and device for loading control in webpage
CN112035188A (en) * 2020-09-28 2020-12-04 中移(杭州)信息技术有限公司 Control generation method and device, network equipment and storage medium
CN115470423A (en) * 2022-11-15 2022-12-13 深圳市乐凡信息科技有限公司 Android system updating method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130226991A1 (en) * 2012-02-27 2013-08-29 Disney Enterprises, Inc. Ensuring availability and parameter format of url scheme commands
CN103973635A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Page access control method, and related device and system
CN107025583A (en) * 2016-01-29 2017-08-08 阿里巴巴集团控股有限公司 A kind of rendering intent of page control, equipment and terminal device
CN107066631A (en) * 2017-05-26 2017-08-18 北京三快在线科技有限公司 Display methods, device and the electronic equipment of the page
CN107423365A (en) * 2017-06-28 2017-12-01 努比亚技术有限公司 Web access method, terminal and computer-readable recording medium
CN107968769A (en) * 2016-10-19 2018-04-27 中兴通讯股份有限公司 Webpage security detection method and device
CN108052365A (en) * 2017-12-19 2018-05-18 深圳市四格互联信息技术有限公司 The component generation method and device of user interface
US20180314513A1 (en) * 2017-05-01 2018-11-01 Apptimize, Inc. Mobile Application Webview Modification
CN108846131A (en) * 2018-07-03 2018-11-20 深圳鼎盛电脑科技有限公司 Weex page rendering method, apparatus, terminal and storage medium
CN108845800A (en) * 2018-05-23 2018-11-20 北京五八信息技术有限公司 A kind of implementation method, device, equipment and the storage medium of component extension function

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130226991A1 (en) * 2012-02-27 2013-08-29 Disney Enterprises, Inc. Ensuring availability and parameter format of url scheme commands
CN103973635A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Page access control method, and related device and system
CN107025583A (en) * 2016-01-29 2017-08-08 阿里巴巴集团控股有限公司 A kind of rendering intent of page control, equipment and terminal device
CN107968769A (en) * 2016-10-19 2018-04-27 中兴通讯股份有限公司 Webpage security detection method and device
US20180314513A1 (en) * 2017-05-01 2018-11-01 Apptimize, Inc. Mobile Application Webview Modification
CN107066631A (en) * 2017-05-26 2017-08-18 北京三快在线科技有限公司 Display methods, device and the electronic equipment of the page
CN107423365A (en) * 2017-06-28 2017-12-01 努比亚技术有限公司 Web access method, terminal and computer-readable recording medium
CN108052365A (en) * 2017-12-19 2018-05-18 深圳市四格互联信息技术有限公司 The component generation method and device of user interface
CN108845800A (en) * 2018-05-23 2018-11-20 北京五八信息技术有限公司 A kind of implementation method, device, equipment and the storage medium of component extension function
CN108846131A (en) * 2018-07-03 2018-11-20 深圳鼎盛电脑科技有限公司 Weex page rendering method, apparatus, terminal and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209973A (en) * 2019-05-24 2019-09-06 厦门美柚信息科技有限公司 A kind of web game loading method and device
CN110209973B (en) * 2019-05-24 2021-03-19 厦门美柚股份有限公司 Webpage game loading method and device
CN110442286A (en) * 2019-07-29 2019-11-12 北京奇艺世纪科技有限公司 A kind of page display method, device and electronic equipment
CN110929205A (en) * 2019-11-13 2020-03-27 贝壳技术有限公司 Method and device for loading control in webpage
CN112035188A (en) * 2020-09-28 2020-12-04 中移(杭州)信息技术有限公司 Control generation method and device, network equipment and storage medium
CN115470423A (en) * 2022-11-15 2022-12-13 深圳市乐凡信息科技有限公司 Android system updating method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109522500B (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN109522500A (en) Webpage display process, device, terminal and storage medium
EP2580683B1 (en) Creating and launching a web application with credentials
US8386955B1 (en) User-optimized content for web browsing windows
US9069636B2 (en) Dynamic web application notifications including task bar overlays
US9021469B2 (en) Web application pinning including task bar pinning
CN102939584B (en) List is integrated
CN102736914B (en) For starting computer-implemented equipment and the method for network application
US20180314513A1 (en) Mobile Application Webview Modification
US20110173602A1 (en) Execution environment software, client device, and server device
US20060095860A1 (en) Method and system of providing dynamic dialogs
CN106406961A (en) Method and device for loading and providing application based on browser
EP2580678A2 (en) Web application navigation domains
EP2798452A1 (en) Hybrid mobile interactions for native apps and web apps
EP2580685A2 (en) Web application home button
WO2011156155A2 (en) Web application transitioning and transient web applications
WO2011156170A2 (en) Creating task sessions
CN101383842A (en) System and method for displaying network information by computer background screen
CN106649497B (en) Webpage display method and device
CN104657201A (en) Method, device, equipment and system for pushing application program
CN104052769B (en) It is a kind of to mobile terminal apply comprising resource updates methods, devices and systems
CN108334360A (en) Method, apparatus, storage medium and the computer equipment of application program dynamic load
CN108920645A (en) Method and device for displaying intelligent device page, intelligent device and storage medium
CN109254784B (en) Distributed software installation method and system based on web interface
CN102750165B (en) A kind of browser display method and handheld device
CN110377859A (en) A kind of control method and control device controlling web page operation

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
GR01 Patent grant
GR01 Patent grant