CN105868354A - Web page repairing method and device - Google Patents
Web page repairing method and device Download PDFInfo
- Publication number
- CN105868354A CN105868354A CN201610186953.0A CN201610186953A CN105868354A CN 105868354 A CN105868354 A CN 105868354A CN 201610186953 A CN201610186953 A CN 201610186953A CN 105868354 A CN105868354 A CN 105868354A
- Authority
- CN
- China
- Prior art keywords
- webpage
- html code
- web page
- module
- detection script
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a web page repairing method and device and belongs to the technical field of Internet. The web page repairing method comprises the steps that after an HTML code of a web page is obtained, a detection script is added into the HTML code; when the HTML code is analyzed for carrying out web page display, the detection script is analyzed, and whether the web page is displayed normally or not is detected according to the analysis result; when the web page is not displayed normally according to the detection result, the web page is repaired and displayed. The method solves the problem that the prior art can only solve the problem that due to the network reason, the web page can not be loaded normally, but can not solve the problem that due to other reasons, the web page can not be loaded normally; the effect of adopting corresponding solution modes for various problems that the web page can not be loaded normally can be achieved.
Description
Technical field
It relates to Internet technical field, particularly to a kind of webpage restorative procedure and device.
Background technology
It is known that terminal be utilize server to provide HTML (Hyper Text Markup Language,
HTML) code loading webpage.
When terminal cannot normal load webpage time, the settling mode that user is general is: exit the net being currently in use
Network application program, resets terminal network, is again turned on web application, checks web application
In webpage whether normal load.But cause terminal cannot the reason of normal load webpage numerous, aforesaid way
Be only capable of solving due to network reason causes webpage cannot the problem of normal load, it is impossible to specific aim solves due to it
His reason causes the webpage cannot the problem of normal load.
Summary of the invention
The disclosure provides a kind of webpage restorative procedure and device.Described technical scheme is as follows:
First aspect according to disclosure embodiment, it is provided that a kind of webpage restorative procedure, described method includes:
After the HTML code obtaining webpage, described HTML code adds detection script;
When resolving described HTML code and carrying out web displaying, resolve described detection script, according to resolving knot
Fruit detects described webpage and the most normally shows;
Testing result be described webpage the most normally show time, described webpage is carried out repair display.
Embodiment of the disclosure that the technical scheme that first aspect provides can include following beneficial effect: by
Adding detection script in the HTML code of the webpage obtained, detecting according to the analysis result of this detection script should
Webpage the most normally shows, testing result be this webpage the most normally show time, carry out repairing aobvious to this webpage
Show;Owing to terminal can perform corresponding webpage reparation operation according to the testing result of this script, therefore solve
Prior art be only capable of solving due to network reason causes webpage cannot the problem of normal load, it is impossible to specific aim solution
Certainly due to other reasons causes webpage cannot the problem of normal load;Reach for causing the webpage cannot be normal
The various problems loaded take the effect of corresponding settling mode.
Optionally, described carry out described webpage repairs display, including:
The HTML code of described webpage is again downloaded from described server;
Described HTML code according to again downloading renders described webpage.
Embodiment of the disclosure that the optional technical scheme that first aspect provides can include following beneficial effect:
By again downloading the HTML code of webpage from server, webpage is rendered again, owing to terminal can basis
Detection script obtains HTML code from server automatically, therefore avoids the step of the loaded down with trivial details manual operation of user
Suddenly.
Optionally, described carry out described webpage repairs display, including:
Described detection script is utilized to judge the webpage being not yet the successfully downloaded money involved by described HTML code
Source;
Sending HTML (Hypertext Markup Language) HTTP for asking to download described web page resources to described server please
Ask;
Receive the described web page resources of described server feedback, described web page resources is rendered to described webpage.
Embodiment of the disclosure that the optional technical scheme that first aspect provides can include following beneficial effect:
By the result of determination according to detection script, in server acquisition result of determination involved by HTML code
The web page resources being not yet successfully downloaded, receives the web page resources of this server feedback, by this web page resources wash with watercolours
Dye is to webpage so that mobile terminal only needs the web page resources to being not yet successfully downloaded to render, and shortens
The resume speed of webpage, promotes Consumer's Experience.
Optionally, described testing result be described webpage the most normally show time, described webpage is repaired
Display, including:
Described testing result be described webpage the most normally show time, export information, described information
For guiding user to repair described webpage;
When the reparation instruction produced after receiving according to the operation of described information, described webpage is repaiied
Multiple display.
Embodiment of the disclosure that the optional technical scheme that first aspect provides can include following beneficial effect:
By after user indicates reparation webpage, perform to repair operation to this webpage so that user can be according to oneself
Wish decide whether repair webpage, improve Consumer's Experience.
Optionally, the described detection script of described parsing, detects described webpage according to analysis result and the most normally shows
Show, including:
Resolve described detection script, utilize described detection script to detect successively involved by described HTML code
Whether web page resources is successfully downloaded;
If at least one in the web page resources involved by described HTML code is not successfully downloaded, then judge
Described webpage the most normally shows.
Embodiment of the disclosure that the optional technical scheme that first aspect provides can include following beneficial effect:
By utilizing detection script to detect whether the web page resources involved by HTML code is successfully downloaded successively, come
Judge that this webpage the most normally shows so that result of determination is more accurate.
Optionally, described interpolation detection script in described HTML code, including:
End position at described HTML code adds described detection script.
Second aspect according to disclosure embodiment, it is provided that a kind of webpage prosthetic device, described device includes:
Add module, be configured to, after the HTML code obtaining webpage, add in described HTML code
Add detection script;
Detection module, is configured to, when resolving described HTML code and carrying out web displaying, add described in parsing
Add the described detection script that module is added, detect described webpage according to analysis result and the most normally show;
Display module, be configured to the testing result of described detection module be described webpage the most normally show time,
Carry out described webpage repairing display.
Optionally, described display module, including:
Download submodule, be configured to again download from described server the HTML code of described webpage;
First renders submodule, is configured to the described HTML generation again downloaded according to described download submodule
Code renders described webpage.
Optionally, described display module, including:
First decision sub-module, the described detection script being configured to, with the interpolation of described interpolation module judges institute
State the web page resources being not yet successfully downloaded involved by HTML code;
Send submodule, be configured to send to described server judge submodule for asking to download described first
The HTTP request of the described web page resources that block judges;
Second renders submodule, is configured to receive the described web page resources of described server feedback, by described
Web page resources renders to described webpage.
Optionally, described display module, also include:
Output sub-module, be configured to described testing result be described webpage the most normally show time, output carries
Show that information, described information are used for guiding user to repair described webpage;
Display sub-module, is configured as receiving the described information exported according to described output sub-module
During the reparation instruction produced after operation, carry out described webpage repairing display.
Optionally, described detection module, including:
Detection sub-module, is configured to resolve the described detection script that described interpolation module is added, and utilizes described
Detection script detects whether the web page resources involved by described HTML code is successfully downloaded successively;
Second decision sub-module, is configured as described detection sub-module and detects involved by described HTML code
And web page resources at least one when not being successfully downloaded, it is determined that described webpage the most normally shows.
Optionally, described interpolation module, it is also configured to the end position at described HTML code and adds
The described detection script that described interpolation module is added.
The third aspect according to disclosure embodiment, it is provided that a kind of webpage prosthetic device, described device includes:
Processor;
For storing the memorizer of this processor executable;
Wherein, this processor is configured to:
After the HTML code obtaining webpage, described HTML code adds detection script;
When resolving described HTML code and carrying out web displaying, resolve described detection script, according to resolving knot
Fruit detects described webpage and the most normally shows;
Testing result be described webpage the most normally show time, described webpage is carried out repair display.
It should be appreciated that it is only exemplary that above general description and details hereinafter describe, can not
Limit the disclosure.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the disclosure
Embodiment, and in description together for explaining the principle of the disclosure.
Fig. 1 is the flow chart according to a kind of webpage restorative procedure shown in an exemplary embodiment;
Fig. 2 A is the flow chart according to a kind of webpage restorative procedure shown in another exemplary embodiment;
Fig. 2 B is to illustrate the flow chart that this webpage carries out repair display packing according to an exemplary embodiment;
Fig. 2 C is the flow process repairing display packing according to carrying out this webpage shown in another exemplary embodiment
Figure;
Fig. 2 D is the flow chart according to a kind of webpage restorative procedure shown in another exemplary embodiment;
Fig. 3 A is the block diagram according to a kind of webpage prosthetic device shown in an exemplary embodiment;
Fig. 3 B is the block diagram according to a kind of webpage prosthetic device shown in another exemplary embodiment;
Fig. 4 is the block diagram according to a kind of device for repairing webpage shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Following retouches
Stating when relating to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.
Embodiment described in following exemplary embodiment does not represent all embodiment party consistent with the disclosure
Formula.On the contrary, they only with describe in detail in appended claims, the disclosure some in terms of mutually one
The example of the apparatus and method caused.
Fig. 1 is the flow chart according to a kind of webpage restorative procedure shown in an exemplary embodiment, such as Fig. 1 institute
Showing, this webpage restorative procedure comprises the following steps.
In a step 101, after the HTML code obtaining webpage, this HTML code adds detection
Script.
In a step 102, when resolving HTML code and carrying out web displaying, resolved detection script, according to
Analysis result detection webpage the most normally shows.
When terminal resolved detection script, can utilize this detection script that the HTML code parsed is entered
Row detection, say, that the analysis result of this detection script is actually this detection script to this HTML generation
The testing result of code, therefore, terminal can judge what this HTML code was rendered according to this analysis result
Webpage the most normally shows.
In step 103, testing result be this webpage the most normally show time, carry out repairing aobvious to this webpage
Show.
In sum, the webpage restorative procedure provided in disclosure embodiment, by the webpage obtained
HTML code adds detection script, detects this webpage according to the analysis result of this detection script the most normal
Display, testing result be this webpage the most normally show time, this webpage is carried out repair display;Due to terminal
Corresponding webpage reparation operation can be performed according to the testing result of this script, therefore solve prior art and be only capable of
Solve due to network reason causes webpage cannot the problem of normal load, it is impossible to specific aim solves former due to other
Because causing the webpage cannot the problem of normal load;Reach for causing webpage to ask by the various of normal load
Topic takes the effect of corresponding settling mode.
Fig. 2 A is the flow chart according to a kind of webpage restorative procedure shown in another exemplary embodiment, such as figure
Shown in 2A, this webpage restorative procedure comprises the following steps, and wherein, the step 102 in Fig. 1 can be substituted
For following step 202a to step 202b.
In step 201, after the HTML code obtaining webpage, this HTML code adds detection
Script.
Owing to terminal resolves the order of code the most from top to bottom, and only have been carried out from clothes in terminal
Business device obtains the operation of web page resources, just can determine that whether terminal causes net because of unsuccessful acquisition web page resources
The problem that page cannot normally show, therefore, detection script is typically to be added on the end position of HTML code,
Namely it is added on HTML code for obtaining after the script of web page resources.So, in follow-up work eventually
End can the HTML code of first analyzing web page, then resolved detection script so that the testing result of detection script
More accurate.
For example, the HTML code of a webpage is:
This webpage is added the HTML code after detection script:
In step 202a, resolved detection script, utilize this detection script to detect successively involved by HTML code
And web page resources whether be successfully downloaded.
Generally, webpage be by CSS (English: Cascading Style Sheets, Chinese: CSS),
JS (English: JavaScrip, Chinese: literal translation formula script) and JPG (full name: JPEG, English: Joint
Photographic Experts Group, Chinese: joint image expert group) this three classes web page resources composition,
It is to say, the HTML code of a webpage comprises by this three classes web page resources of CSS, JS and JPG.Cause
This, whether webpage the most normally shows the web page resources involved by the HTML code substantially referring to this webpage
It is successfully downloaded.
In step 202b, if at least one in the web page resources involved by HTML code be not by under successfully
Carry, then judge that webpage the most normally shows.
Terminal utilizes detection script to detect this three classes net of CSS, JS and the JPG involved by HTML code successively
Network resource, if at least one in this three classes resource is not successfully downloaded, then judges that this HTML code is corresponding
Webpage the most normally show.
In step 203, testing result be this webpage the most normally show time, carry out repairing aobvious to this webpage
Show.
When the analysis result of detection script shows that webpage the most normally shows, terminal is then according to this detection script pair
This webpage is repaired, and after reparation completes, automatically refreshes this webpage and show.
In a kind of possible implementation, analysis result has two kinds of display modes, a kind of for only showing webpage
The most normally show, the another kind of reason the most normally shown for display webpage.
Fig. 2 B is to illustrate the flow chart that this webpage carries out repair display packing according to an exemplary embodiment, as
Shown in Fig. 2 B, this webpage carries out repairing display packing and can be realized by following step 203a to step 203b.
In step 203, the HTML code of webpage is again downloaded from server.
When the analysis result of detection script is for only showing that webpage the most normally shows, if detection script detects
When current web page shown by terminal the most normally shows, this terminal obtains this webpage by sending to server
The HTTP request of HTML code, again to download the HTML code of webpage from server.
In step 203b, the HTML code according to again downloading renders webpage.
After terminal downloads to the HTML code of webpage from server, the HTML weight again downloaded can be utilized
Newly render webpage.
Fig. 2 C is the flow process repairing display packing according to carrying out this webpage shown in another exemplary embodiment
Figure, as shown in Figure 2 C, this carries out repairing display packing to this webpage can be by following step 203c to step
203e realizes.
In step 203c, detection script is utilized to judge being not yet successfully downloaded involved by HTML code
Web page resources.
When the analysis result of detection script is the reason that display webpage the most normally shows, if detection script detection
Going out the current web page shown by terminal when the most normally showing, this terminal judges this webpage by utilizing this detection script
The web page resources being not yet successfully downloaded involved by HTML code (in CSS, JS and JPG at least
One).
In step 203d, send the HTTP request for asking to download web page resources to server.
Here the web page resources said refers to the web page resources being not yet successfully downloaded involved by a webpage.
Such as, if detection script judges that the CSS involved by current web page shown by terminal is not yet by under successfully
Carry, then send for asking to download the HTTP request of the CSS of this webpage to server.For another example, if examining
Survey script and judge that the JS involved by current web page shown by terminal is not yet successfully downloaded, then send out to server
Send the HTTP request of JS for asking to download this webpage.
In step 203e, receive the web page resources of server feedback, this web page resources is rendered to webpage.
Such as, after the HTTP request that terminal to server sends for asking to download the JS of webpage, if should
Terminal receives the JS of server feedback, then be added in the HTML code of this webpage by this JS, should
Content involved by JS renders to webpage.
In sum, the webpage restorative procedure provided in disclosure embodiment, by the webpage obtained
HTML code adds detection script, detects this webpage according to the analysis result of this detection script the most normal
Display, testing result be this webpage the most normally show time, this webpage is carried out repair display;Due to terminal
Corresponding webpage reparation operation can be performed according to the testing result of this script, therefore solve prior art and be only capable of
Solve due to network reason causes webpage cannot the problem of normal load, it is impossible to specific aim solves former due to other
Because causing the webpage cannot the problem of normal load;Reach for causing webpage to ask by the various of normal load
Topic takes the effect of corresponding settling mode.
By again downloading the HTML code of webpage from server, webpage is rendered again, due to terminal meeting
Automatically obtain HTML code from server according to detection script, therefore avoid the manual operation that user is loaded down with trivial details
Step.
By the result of determination according to detection script, in server acquisition result of determination involved by HTML code
And the web page resources being not yet successfully downloaded, receive the web page resources of this server feedback, this webpage provided
Source renders to webpage so that mobile terminal only needs the web page resources to being not yet successfully downloaded to render,
Shorten the resume speed of webpage, promote Consumer's Experience.
By utilizing detection script to detect the web page resources involved by HTML code successively whether by under successfully
Carry, judge that this webpage the most normally shows so that result of determination is more accurate.
So that user can decide whether to repair webpage according to the wish of oneself, improve Consumer's Experience.?
In a kind of possible implementation, terminal can perform reparation to this webpage after user indicates reparation webpage
Operation.Fig. 2 D is the flow chart according to a kind of webpage restorative procedure shown in another exemplary embodiment, such as figure
Shown in 2D, this webpage restorative procedure can be realized by following step 204 to step 205.
In step 204, testing result be this webpage the most normally show time, export information.
When the analysis result of detection script shows that webpage the most normally shows, detection script can automatic triggering terminal
Output information, this information is used for guiding user to perform scheduled operation, repairs this webpage.Such as,
When the analysis result of detection script shows that webpage the most normally shows, terminal will in screen display reminding information
" shake ", point out the operation that terminal is rocked by user.
It should be noted that the information said here can be prompting user's trigger control, point out user
Sliding terminal, prompting user rocks terminal etc., and the particular content of information is not entered by the present embodiment
Row limits.
In step 205, when the reparation instruction produced after receiving according to information operation, to webpage
Carry out repairing display.
Such as, terminal is after in screen, display reminding information " is shaken ", if terminal is rocked by user
Operation, then terminal can receive according to " shaking " operation produce reparation instruction, webpage is repaiied
Multiple display.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.For the disclosure
The details not disclosed in device embodiment, refer to method of disclosure embodiment.
Fig. 3 A is the block diagram according to a kind of webpage prosthetic device shown in an exemplary embodiment, such as Fig. 3 A institute
Showing, this webpage prosthetic device includes but not limited to: add module 301, detection module 302 and display module
303。
Add module 301, be configured to after the HTML code obtaining webpage, in this HTML code
Add detection script.
Owing to terminal resolves the order of code the most from top to bottom, and only have been carried out from clothes in terminal
Business device obtains the operation of web page resources, just can determine that whether terminal causes net because of unsuccessful acquisition web page resources
The problem that page cannot normally show, therefore, detection script is typically to be added on the end position of HTML code,
Namely it is added on HTML code for obtaining after the script of web page resources.So, in follow-up work eventually
End can the HTML code of first analyzing web page, then resolved detection script so that the testing result of detection script
More accurate.
Detection module 302, is configured to, when resolving HTML code and carrying out web displaying, resolve and add mould
The detection script that block 301 adds, the most normally shows according to analysis result detection webpage.
When terminal resolved detection script, can utilize this detection script that the HTML code parsed is entered
Row detection, say, that the analysis result of this detection script is actually this detection script to this HTML generation
The testing result of code, therefore, terminal can judge what this HTML code was rendered according to this analysis result
Webpage the most normally shows.
Display module 303, be configured to the testing result of detection module 302 be this webpage the most normally show time,
Carry out this webpage repairing display.
When the analysis result of detection script shows that webpage the most normally shows, terminal is then according to this detection script pair
This webpage is repaired, and after reparation completes, automatically refreshes this webpage and show.
In a kind of possible implementation, referring to Fig. 3 B, it is to illustrate according to another exemplary embodiment
The block diagram of a kind of webpage prosthetic device, as shown in Figure 3 B, this display module 303 may include that lower carrier
Module 303a and first renders submodule 303b.
Download submodule 303a, be configured to again download from server the HTML code of webpage.
When the analysis result of detection script is for only showing that webpage the most normally shows, if detection script detects
When current web page shown by terminal the most normally shows, this terminal obtains this webpage by sending to server
The HTTP request of HTML code, again to download the HTML code of webpage from server.
First renders submodule 303b, is configured to according to downloading the HTML that submodule 303a downloads again
Code renders webpage.
After terminal downloads to the HTML code of webpage from server, the HTML weight again downloaded can be utilized
Newly render webpage.
In a kind of possible implementation, referring also to Fig. 3 B, this display module 303 can also include: the
One decision sub-module 303c, transmission submodule 303d and second render submodule 303e.
First decision sub-module 303c, is configured to, with adding the detection script judgement that module 301 is added
The web page resources being not yet successfully downloaded involved by HTML code.
When the analysis result of detection script is the reason that display webpage the most normally shows, if detection script detection
Going out the current web page shown by terminal when the most normally showing, this terminal judges this webpage by utilizing this detection script
The web page resources being not yet successfully downloaded involved by HTML code (in CSS, JS and JPG at least
One).
Send submodule 303d, be configured to send to server download the first decision sub-module for asking
The HTTP request of the web page resources that 303c judges.
Here the web page resources said refers to the web page resources being not yet successfully downloaded involved by a webpage.
Such as, if detection script judges that the CSS involved by current web page shown by terminal is not yet by under successfully
Carry, then send for asking to download the HTTP request of the CSS of this webpage to server.For another example, if examining
Survey script and judge that the JS involved by current web page shown by terminal is not yet successfully downloaded, then send out to server
Send the HTTP request of JS for asking to download this webpage.
Second renders submodule 303e, is configured to receive the web page resources of server feedback, is provided by this webpage
Source renders to webpage.
Such as, after the HTTP request that terminal to server sends for asking to download the JS of webpage, if should
Terminal receives the JS of server feedback, then be added in the HTML code of this webpage by this JS, should
Content involved by JS renders to webpage.
In a kind of possible implementation, referring also to Fig. 3 B, this display module 303, including: output
Module 303f and display sub-module 303g.
Output sub-module 303f, be configured to testing result be this webpage the most normally show time, output prompting
Information, this information is used for guiding user to repair the page.
When the analysis result of detection script shows that webpage the most normally shows, detection script can automatic triggering terminal
Output information, this information is used for guiding user to perform scheduled operation, repairs this webpage.Such as,
When the analysis result of detection script shows that webpage the most normally shows, terminal will in screen display reminding information
" shake ", point out the operation that terminal is rocked by user.
It should be noted that the information said here can be prompting user's trigger control, point out user
Sliding terminal, prompting user rocks terminal etc., and the particular content of information is not entered by the present embodiment
Row limits.
Display sub-module 303g, is configured as the prompting letter received according to output sub-module 303f output
During the reparation instruction produced after breath operation, carry out webpage repairing display.
Such as, terminal is after in screen, display reminding information " is shaken ", if terminal is rocked by user
Operation, then terminal can receive according to " shaking " operation produce reparation instruction, perform webpage is entered
Row repairs the step of display.
In a kind of possible implementation, referring also to Fig. 3 B, this detection module 302 may include that detection
Submodule 302a and the second decision sub-module 302b.
Detection sub-module 302a, is configured to resolve and adds the detection script that module 301 is added, utilize this inspection
Survey script and detect whether the web page resources involved by HTML code is successfully downloaded successively.
Generally, webpage be by CSS (English: Cascading Style Sheets, Chinese: CSS),
JS (English: JavaScrip, Chinese: literal translation formula script) and JPG (full name: JPEG, English: Joint
Photographic Experts Group, Chinese: joint image expert group) these three classes Internet resources composition,
It is to say, the HTML code of a webpage comprises by these three classes Internet resources of CSS, JS and JPG.Cause
This, whether webpage the most normally shows the web page resources involved by the HTML code substantially referring to this webpage
It is successfully downloaded.
Second decision sub-module 302b, is configured as detection sub-module and detects involved by 302aHTML code
And web page resources at least one when not being successfully downloaded, it is determined that webpage the most normally shows.
Terminal utilizes detection script to detect this three classes net of CSS, JS and the JPG involved by HTML code successively
Network resource, if at least one in this three classes resource is not successfully downloaded, then judges that this HTML code is corresponding
Webpage the most normally show.
In sum, the webpage prosthetic device provided in disclosure embodiment, by the webpage obtained
HTML code adds detection script, detects this webpage according to the analysis result of this detection script the most normal
Display, testing result be this webpage the most normally show time, this webpage is carried out repair display;Due to terminal
Corresponding webpage reparation operation can be performed according to the testing result of this script, therefore solve prior art and be only capable of
Solve due to network reason causes webpage cannot the problem of normal load, it is impossible to specific aim solves former due to other
Because causing the webpage cannot the problem of normal load;Reach for causing webpage to ask by the various of normal load
Topic takes the effect of corresponding settling mode.
By again downloading the HTML code of webpage from server, webpage is rendered again, due to terminal meeting
Automatically obtain HTML code from server according to detection script, therefore avoid the manual operation that user is loaded down with trivial details
Step.
By the result of determination according to detection script, in server acquisition result of determination involved by HTML code
And the web page resources being not yet successfully downloaded, receive the web page resources of this server feedback, this webpage provided
Source renders to webpage so that mobile terminal only needs the web page resources to being not yet successfully downloaded to render,
Shorten the resume speed of webpage, promote Consumer's Experience.
By utilizing detection script to detect the web page resources involved by HTML code successively whether by under successfully
Carry, judge that this webpage the most normally shows so that result of determination is more accurate.
The disclosure one exemplary embodiment provides a kind of webpage prosthetic device, it is possible to realize what the disclosure provided
Webpage restorative procedure, this webpage prosthetic device includes: processor, be used for storing processor executable
Memorizer;
Wherein, processor is configured to:
After the HTML code obtaining webpage, this HTML code adds detection script;
When resolving HTML code and carrying out web displaying, resolved detection script, detects net according to analysis result
Page the most normally shows;
Testing result be this webpage the most normally show time, this webpage is carried out repair display.
Fig. 4 is the block diagram according to a kind of device for repairing webpage shown in an exemplary embodiment.Such as,
Device 400 can be mobile phone, computer, digital broadcast terminal, messaging devices, and game controls
Platform, tablet device, armarium, body-building equipment, platform personal digital assistant etc..
With reference to Fig. 4, device 400 can include one or more assembly following: processes assembly 402, memorizer
404, power supply module 406, multimedia groupware 408, audio-frequency assembly 410, input/output (I/O) interface 412,
Sensor cluster 414, and communications component 416.
Process assembly 402 and generally control the integrated operation of device 400, such as with display, call, number
The operation being associated according to communication, camera operation and record operation.Process assembly 402 and can include one or many
Platform processor 418 performs instruction, to complete all or part of step of above-mentioned method.Additionally, process
Assembly 402 can include one or more module, it is simple to process between assembly 402 and other assemblies is mutual.
Such as, process assembly 402 and can include multi-media module, to facilitate multimedia groupware 408 and to process assembly
Mutual between 402.
Memorizer 404 is configured to store various types of data to support the operation at device 400.These
The example of data includes any application program for operation on device 400 or the instruction of method, contact person
Data, telephone book data, message, picture, video etc..Memorizer 404 can be by any kind of volatile
Property or non-volatile memory device or combinations thereof realize, such as static RAM (SRAM),
Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM),
Programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory,
Disk or CD.
The various assemblies that power supply module 406 is device 400 provide electric power.Power supply module 406 can include electricity
Management system, one or more power supply, and other generate, manage and distribute electric power phase with for device 400
The assembly of association.
The screen of one output interface of offer that multimedia groupware 408 is included between device 400 and user.
In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen
Curtain includes that touch panel, screen may be implemented as touch screen, to receive the input signal from user.Touch
Touch panel and include that one or more touch sensor is with the gesture on sensing touch, slip and touch panel.Touch
Touch sensor and can not only sense touch or the border of sliding action, but also detect and touch or slide
Relevant persistent period and pressure.In certain embodiments, multimedia groupware 408 includes a preposition shooting
Head and/or post-positioned pick-up head.When device 400 is in operator scheme, during such as screening-mode or video mode, front
Put photographic head and/or post-positioned pick-up head can receive outside multi-medium data.Every front-facing camera and rearmounted
Photographic head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 410 is configured to output and/or input audio signal.Such as, audio-frequency assembly 410 includes
One mike (MIC), when device 400 is in operator scheme, such as call model, logging mode and voice
During recognition mode, mike is configured to receive external audio signal.The audio signal received can be entered
One step is stored in memorizer 404 or sends via communications component 416.In certain embodiments, audio-frequency assembly
410 also include a speaker, are used for exporting audio signal.
I/O interface 412 provides interface, above-mentioned peripheral interface for processing between assembly 402 and peripheral interface module
Module can be keyboard, puts striking wheel, button etc..These buttons may include but be not limited to: home button, sound
Amount button, start button and locking press button.
Sensor cluster 414 includes one or more sensor, for providing each aspect for device 400
State estimation.Such as, what sensor cluster 414 can detect device 400 opens/closed mode, assembly
Relative localization, such as assembly is display and the keypad of device 400, and sensor cluster 414 is all right
Detection the device 400 or position change of 400 1 assemblies of device, existence that user contacts with device 400 or
Do not exist, device 400 orientation or acceleration/deceleration and the variations in temperature of device 400.Sensor cluster 414 can
To include proximity transducer, it is configured to when there is no any physical contact object near detecting.
Sensor cluster 414 can also include optical sensor, such as CMOS or ccd image sensor, is used for becoming
Use as in application.In certain embodiments, this sensor cluster 414 can also include acceleration transducer,
Gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 416 is configured to facilitate the logical of wired or wireless mode between device 400 and other equipment
Letter.Device 400 can access wireless network based on communication standard, such as Wi-Fi, 2G or 3G, or they
Combination.In an exemplary embodiment, communications component 416 receives wide from outside via broadcast channel
The broadcast singal of broadcast management system or broadcast related information.In an exemplary embodiment, communications component 416
Also include near-field communication (NFC) module, to promote junction service.Such as, can be based on penetrating in NFC module
Frequency identification (RF mark) technology, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology,
Bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 400 can by one or more application specific integrated circuit (ASIC),
Digital signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD),
Field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are real
Existing, it is used for performing above-mentioned webpage restorative procedure.
In the exemplary embodiment, a kind of non-transitory computer-readable storage medium including instruction is additionally provided
Matter, such as, include the memorizer 404 of instruction, and above-mentioned instruction can be performed by the processor 418 of device 400 with complete
Become above-mentioned webpage restorative procedure.Such as, non-transitory computer-readable recording medium can be ROM, random
Access memorizer (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to these public affairs
Other embodiment opened.The application is intended to any modification, purposes or the adaptations of the disclosure,
These modification, purposes or adaptations are followed the general principle of the disclosure and include that the disclosure is not disclosed
Common knowledge in the art or conventional techniques means.Description and embodiments is considered only as exemplary
, the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure is not limited to accurate knot described above and illustrated in the accompanying drawings
Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only by appended
Claim limits.
Claims (13)
1. a webpage restorative procedure, it is characterised in that described method includes:
After the HTML HTML code obtaining webpage, described HTML code adds inspection
Survey script;
When resolving described HTML code and carrying out web displaying, resolve described detection script, according to resolving knot
Fruit detects described webpage and the most normally shows;
Testing result be described webpage the most normally show time, described webpage is carried out repair display.
Method the most according to claim 1, it is characterised in that described carry out described webpage repairing aobvious
Show, including:
The HTML code of described webpage is again downloaded from described server;
Described HTML code according to again downloading renders described webpage.
Method the most according to claim 1, it is characterised in that described carry out described webpage repairing aobvious
Show, including:
Described detection script is utilized to judge the webpage being not yet the successfully downloaded money involved by described HTML code
Source;
Sending HTML (Hypertext Markup Language) HTTP for asking to download described web page resources to described server please
Ask;
Receive the described web page resources of described server feedback, described web page resources is rendered to described webpage.
Method the most according to claim 1, it is characterised in that described is described webpage in testing result
When the most normally showing, carry out described webpage repairing display, including:
Described testing result be described webpage the most normally show time, export information, described information
For guiding user to repair described webpage;
When the reparation instruction produced after receiving according to the operation of described information, described webpage is repaiied
Multiple display.
Method the most according to claim 1, it is characterised in that the described detection script of described parsing, root
Detect described webpage according to analysis result the most normally to show, including:
Resolve described detection script, utilize described detection script to detect successively involved by described HTML code
Whether web page resources is successfully downloaded;
If at least one in the web page resources involved by described HTML code is not successfully downloaded, then judge
Described webpage the most normally shows.
6. according to described method arbitrary in claim 1 to 5, it is characterised in that described at described HTML
Code adds detection script, including:
End position at described HTML code adds described detection script.
7. a webpage prosthetic device, it is characterised in that described device includes:
Add module, be configured to, after the HTML code obtaining webpage, add in described HTML code
Add detection script;
Detection module, is configured to, when resolving described HTML code and carrying out web displaying, add described in parsing
Add the described detection script that module is added, detect described webpage according to analysis result and the most normally show;
Display module, be configured to the testing result of described detection module be described webpage the most normally show time,
Carry out described webpage repairing display.
Device the most according to claim 7, it is characterised in that described display module, including:
Download submodule, be configured to again download from described server the HTML code of described webpage;
First renders submodule, is configured to the described HTML generation again downloaded according to described download submodule
Code renders described webpage.
Device the most according to claim 7, it is characterised in that described display module, also includes:
First decision sub-module, the described detection script being configured to, with the interpolation of described interpolation module judges institute
State the web page resources being not yet successfully downloaded involved by HTML code;
Send submodule, be configured to send to described server judge submodule for asking to download described first
The HTTP request of the described web page resources that block judges;
Second renders submodule, is configured to receive the described web page resources of described server feedback, by described
Web page resources renders to described webpage.
Device the most according to claim 7, it is characterised in that described display module, also includes:
Output sub-module, be configured to described testing result be described webpage the most normally show time, output carries
Show that information, described information are used for guiding user to repair described webpage;
Display sub-module, is configured as receiving the described information exported according to described output sub-module
During the reparation instruction produced after operation, carry out described webpage repairing display.
11. devices according to claim 8, it is characterised in that described detection module, including:
Detection sub-module, is configured to resolve the described detection script that described interpolation module is added, and utilizes described
Detection script detects whether the web page resources involved by described HTML code is successfully downloaded successively;
Second decision sub-module, is configured as described detection sub-module and detects involved by described HTML code
And web page resources at least one when not being successfully downloaded, it is determined that described webpage the most normally shows.
12. according to Claim 8 to described device arbitrary in 11, it is characterised in that described interpolation module,
It is also configured to
End position at described HTML code adds the described detection script that described interpolation module is added.
13. 1 kinds of webpage prosthetic devices, it is characterised in that described device includes:
Processor;
For storing the memorizer of described processor executable;
Wherein, described processor is configured to:
After the HTML code obtaining webpage, described HTML code adds detection script;
When resolving described HTML code and carrying out web displaying, resolve described detection script, according to resolving knot
Fruit detects described webpage and the most normally shows;
Testing result be described webpage the most normally show time, described webpage is carried out repair display.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610186953.0A CN105868354B (en) | 2016-03-29 | 2016-03-29 | Webpage repairing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610186953.0A CN105868354B (en) | 2016-03-29 | 2016-03-29 | Webpage repairing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105868354A true CN105868354A (en) | 2016-08-17 |
CN105868354B CN105868354B (en) | 2020-06-02 |
Family
ID=56625275
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610186953.0A Active CN105868354B (en) | 2016-03-29 | 2016-03-29 | Webpage repairing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105868354B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107784230A (en) * | 2017-02-16 | 2018-03-09 | 平安科技(深圳)有限公司 | The restorative procedure and device of page leak |
CN110727891A (en) * | 2019-09-09 | 2020-01-24 | 中国平安财产保险股份有限公司 | Browser cache management method and device and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101655863A (en) * | 2009-04-24 | 2010-02-24 | 北京搜狗科技发展有限公司 | Method for loading web pages in browser and browser |
CN103259790A (en) * | 2013-04-28 | 2013-08-21 | 深圳市深信服电子科技有限公司 | Protective method and device for network security |
CN103324735A (en) * | 2013-06-28 | 2013-09-25 | 贝壳网际(北京)安全技术有限公司 | Method and device for loading abnormal page in browser and client |
-
2016
- 2016-03-29 CN CN201610186953.0A patent/CN105868354B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101655863A (en) * | 2009-04-24 | 2010-02-24 | 北京搜狗科技发展有限公司 | Method for loading web pages in browser and browser |
CN103259790A (en) * | 2013-04-28 | 2013-08-21 | 深圳市深信服电子科技有限公司 | Protective method and device for network security |
CN103324735A (en) * | 2013-06-28 | 2013-09-25 | 贝壳网际(北京)安全技术有限公司 | Method and device for loading abnormal page in browser and client |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107784230A (en) * | 2017-02-16 | 2018-03-09 | 平安科技(深圳)有限公司 | The restorative procedure and device of page leak |
WO2018149374A1 (en) * | 2017-02-16 | 2018-08-23 | 平安科技(深圳)有限公司 | Page vulnerability remediation method and device |
CN107784230B (en) * | 2017-02-16 | 2019-06-07 | 平安科技(深圳)有限公司 | The restorative procedure and device of page loophole |
CN110727891A (en) * | 2019-09-09 | 2020-01-24 | 中国平安财产保险股份有限公司 | Browser cache management method and device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN105868354B (en) | 2020-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106603667A (en) | Screen information sharing method and device | |
CN104778405B (en) | Ad blocking method and device | |
CN105302727A (en) | Testing method, device and system | |
CN104933170A (en) | Information exhibition method and device | |
CN105095427A (en) | Search recommendation method and device | |
CN107193441B (en) | Desktop pendant previewing method and device | |
CN104123341A (en) | Method and device for downloading file and route device | |
CN105488145B (en) | Display methods, device and the terminal of web page contents | |
CN104636106A (en) | Picture displaying method and device and terminal device | |
CN106789551B (en) | Conversation message methods of exhibiting and device | |
CN107809491A (en) | The method for down loading and device of installation kit | |
CN107239527A (en) | web access method and device | |
CN105677392A (en) | Method and apparatus for recommending applications | |
CN104536787B (en) | Resource preloads method and device | |
CN106528735A (en) | Method and device for controlling browser to play media resources | |
CN105095235A (en) | Application program recommendation method and device | |
CN105630780A (en) | Webpage information processing method and apparatus | |
CN105183493A (en) | Display method and device of network information | |
CN104391877A (en) | Method, device, terminal and server for searching subjects | |
CN104951184A (en) | Application program downloading method and device | |
CN110413169A (en) | A kind of information displaying method, device and medium | |
CN107360322B (en) | Information prompting method and device | |
CN105808304A (en) | Code deployment method, device and system | |
CN105868354A (en) | Web page repairing method and device | |
CN105551047A (en) | Picture content detecting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |