CN103353842A - Webpage loading method and device - Google Patents

Webpage loading method and device Download PDF

Info

Publication number
CN103353842A
CN103353842A CN2013102467521A CN201310246752A CN103353842A CN 103353842 A CN103353842 A CN 103353842A CN 2013102467521 A CN2013102467521 A CN 2013102467521A CN 201310246752 A CN201310246752 A CN 201310246752A CN 103353842 A CN103353842 A CN 103353842A
Authority
CN
China
Prior art keywords
resource
main document
webpage
loading
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013102467521A
Other languages
Chinese (zh)
Inventor
徐国市
左景龙
张少伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Technology Co Ltd
Original Assignee
Beijing Xiaomi 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 Beijing Xiaomi Technology Co Ltd filed Critical Beijing Xiaomi Technology Co Ltd
Priority to CN2013102467521A priority Critical patent/CN103353842A/en
Publication of CN103353842A publication Critical patent/CN103353842A/en
Pending legal-status Critical Current

Links

Images

Abstract

An embodiment of the invention provides a webpage loading method and device. The method comprises steps as follows: whether a loaded resource belongs to a main document of a webpage is detected in the webpage analysis process; and the resource is loaded if the loaded resource belongs to the main document; and the resource is shielded if the loaded resource doesn't belong to the main document. By means of the webpage loading method and device, whether the loaded resource belongs to the main document can be detected in the webpage analysis process, so that the resource can be selectively loaded; and if the resource belongs to the main document, the resource is loaded, and otherwise, the resource is shielded, so that flow is saved, expression of webpage content cannot be influenced, and the webpage content can be completely expressed.

Description

A kind of loading method of webpage and device
Technical field
The embodiment of the invention relates to the Web Page Processing technology, particularly relates to a kind of loading method and device of webpage.
Background technology
The surf the web user of information of terminal is more and more along with using, and how to save surfing flow also more and more important.
The flow that when surfing the Net, uses in order to save the user, the current proposition has a lot of province's stream modes, when browsing such as user's webpage clicking, the meeting analyzing web page is to show webpage, when resolving, can shield some larger resource files, the word content of body part in the display web page only, thus reach the purpose of saving flow.
Although above-mentioned method can be saved flow, some problems of bringing.This method is just carried out province's stream according to size or the type of resource file simply, may mask the content of body part, thereby causes the content statement of body part imperfect, affects user's reading.
Summary of the invention
The embodiment of the invention provides a kind of loading method and device of webpage, causes web page contents to explain incomplete problem to solve in the webpage loading owing to saving flow.
A kind of loading method of webpage comprises:
In the process of analyzing web page, detect the main document whether resource that loads belongs to webpage;
Belong to described main document if detect the resource of described loading, then load described resource;
Do not belong to described main document if detect the resource of described loading, then shield described resource.
Whether the resource that described detection loads belongs to the main document of webpage, comprising:
Obtain the node of resource correspondence in the web document structure of described loading, and the label of described node;
Whether the label that detects described node belongs to the label of main document;
If the label of described node belongs to the label of main document, then the resource of described loading belongs to the main document of webpage;
If the label of described node does not belong to the label of main document, then the resource of described loading does not belong to the main document of webpage.
The described resource that detects described loading belongs to after the main document of webpage, and described method also comprises:
Resource size and/or resource type to described resource detect, and described resource are carried out the operation that loads or shield according to testing result.
Described resource size to described resource detects, and described resource is carried out the operation that loads or shield according to testing result, comprising:
Whether detect the resource size of described resource greater than the resource size threshold value that presets;
If described testing result be described resource size greater than the described resource size threshold value that presets, then carry out the operation of the described resource of shielding;
If described testing result be described resource size less than the described resource size threshold value that presets, then carry out to load the operation of described resource.
Described resource type to described resource detects, and described resource is carried out the operation that loads or shield according to testing result, comprising:
Whether the resource type that detects described resource is streaming media resource;
If described testing result is described resource type is streaming media resource, then carry out the operation of the described resource of shielding;
Be not streaming media resource if described testing result is described resource type, then carry out the operation that loads described resource.
Described method also comprises:
If described testing result is described resource type is streaming media resource, the corresponding picture of a frame that then obtains described streaming media resource is the feature picture, and loads described feature picture.
Described method also comprises:
If receive the trigger action to described feature picture, then load the corresponding streaming media resource of described feature picture.
A kind of charger of webpage comprises:
First detection module is used for the process at analyzing web page, detects the main document whether resource that loads belongs to webpage;
The load and execution module is used for loading described resource when the resource that detects described loading belongs to described main document; When the resource that detects described loading does not belong to described main document, shield described resource.
Described first detection module comprises: obtain submodule and detection sub-module;
The described submodule that obtains, the resource that is used for obtaining described loading is at node corresponding to web document structure, and the label of described node;
Whether described detection sub-module belongs to the label of main document for detection of the label of described node;
Described first detection module is used for judging that the resource of described loading belongs to the main document of webpage when the label of described node belongs to the label of main document; When the label of described node does not belong to the label of main document, judge that the resource of described loading does not belong to the main document of webpage.
Described device also comprises:
The second detection module is used for resource size and/or the resource type of described resource are detected;
Described load and execution module is used for described resource being carried out the operation that loads or shield according to testing result.
Described the second detection module comprises: the resource size detection sub-module;
Described resource size detection sub-module, for detection of the resource size of described resource whether greater than the resource size threshold value that presets;
Described load and execution module, being used in described testing result is described resource size during greater than the described resource size threshold value that presets, and carries out the operation of the described resource of shielding; Being used in described testing result is described resource size during less than the described resource size threshold value that presets, and carries out the operation that loads described resource.
Described the second detection module comprises: the resource type detection sub-module;
Whether described resource type detection sub-module is streaming media resource for detection of the resource type of described resource;
Described load and execution module, being used in described testing result is described resource type when being streaming media resource, carries out the operation of the described resource of shielding; Being used in described testing result is described resource type during for streaming media resource, carries out the operation that loads described resource.
Described device also comprises: feature picture acquisition module;
Described feature picture acquisition module, being used in described testing result is described resource type when being streaming media resource, the corresponding picture of a frame that obtains described streaming media resource is the feature picture, and loads described feature picture.
Described device also comprises: trigger module;
Described trigger module is used for triggering described load and execution module when the trigger action that receives described feature picture;
Described load and execution module also is used for loading the corresponding streaming media resource of described feature picture when being triggered.
The embodiment of the invention comprises following advantage:
The embodiment of the invention is in the process of analyzing web page, and whether the resource that can detect loading belongs to described main document, thereby selectively resource is loaded.Then load this resource if resource belongs to described main document, then do not shield this resource if resource does not belong to described main document.Thereby both saved flow, by not affecting statement web page contents that can be complete to the statement of web page contents.
Description of drawings
Fig. 1 is the loading method process flow diagram of the webpage that provides of the embodiment of the invention one;
Fig. 2 is the loading method process flow diagram of the webpage that provides of the embodiment of the invention two;
Fig. 3 is the charger structural drawing of the webpage that provides of the embodiment of the invention three;
Fig. 4 is the charger preferred structure figure of the webpage that provides of the embodiment of the invention three.
Embodiment
For above-mentioned purpose, the feature and advantage that make the embodiment of the invention can become apparent more, below in conjunction with the drawings and specific embodiments the embodiment of the invention is described in further detail.
The embodiment of the invention provides a kind of loading method of webpage, can optionally load resource in the process of analyzing web page, and the resource that belongs to main document is loaded, and the resource that does not belong to main document is shielded.Thereby both saved flow, by not affecting statement web page contents that can be complete to the statement of web page contents.
Embodiment one
With reference to Fig. 1, provided the loading method process flow diagram of the webpage that the embodiment of the invention one provides.
Step 101 in the process of analyzing web page, detects the main document whether resource that loads belongs to webpage.
Webpage at first can obtain this web document when loading, then begin to begin to resolve from the top of document, and the request that can send a series of related objects when resolving comprises external scripts, style sheet, flash, all kinds of resources such as picture or element.
Comprise all kinds of contents such as title, text, advertisement, recommendation message in the webpage, by the parsing to web document, can in webpage, load foregoing.But in the actual treatment, if flow is relatively wasted in the whole loadings of foregoing, therefore, loading content selectively in webpage resolving, for example the user can not browse the advertisement in the webpage usually, and the shielding advertisement can not bring adverse effect to the understanding of main contents in the webpage yet, therefore can it not loaded.
But, during the content that in selecting webpage, loads, can not only consider to save flow, need also to consider whether the content that shields can cause adverse effect to the content of describing in the webpage, as affect the user to the understanding of web page contents etc.
Therefore the embodiment of the invention is being carried out in the resolving webpage, it is not simple only loading word content, but consider the importance of resource in webpage, and before loading, resource can the resource that load be detected, whether detect the resource of described loading from described main document.
If the resource that namely detects described loading belongs to described main document, then execution in step 102; If not, the resource that namely detects described loading does not belong to described main document, and then execution in step 103.
Step 102 loads described resource.
The main contents that webpage is described have been comprised in the main document of webpage, such as title, text etc., the present invention belongs to main document in order not affect the statement of web page contents when saving flow if detect the resource of described loading, and the important ratio of this resource should usually, therefore can load this resource, the picture that for example detects request of loading belongs to main document, then can load this picture, but not the contents such as picture are all shielded, thereby complete statement web page contents is beneficial to user's understanding more.
Step 103 shields described resource.
Do not belong to described main document if detect the resource of described loading, illustrate that then the important ratio of this resource is lower, can shield described resource, and can not produce great adverse effect to the statement of webpage.
In sum, only the resource type of loading resource is carried out defaultly to reach province stream purpose, can cause web page contents to show imperfect.And the embodiment of the invention is analyzed the importance of resource in the process of analyzing web page, namely detects the resource that loads and whether belongs to described main document, thereby selectively resource is loaded.Then load this resource if resource belongs to described main document, then do not shield this resource if resource does not belong to described main document.Thereby both saved flow, by can be on the statement of web page contents impact, statement web page contents that can be complete, and can promote the user at the reading experience of economizing under the stream mode.
Embodiment two
In the actual treatment, the present invention can be applied in the terminal also can be applied in the portable terminal such as equipment such as panel computer, mobile phones such as equipment such as notebook computer, desktop computers.
For example, use notebook computer internet when the user network environment is relatively poor, if in the situation that the full content of the relatively poor Web page loading of network speed, the webpage load time can be long, even possibly can't load.Therefore, the technical scheme that can adopt the embodiment of the invention to provide selectively loads webpage, makes the user can know fast the content of webpage.And for example, when using portable terminal, because terminal screen, internal memory etc. are less and the restriction of the factor such as network environment, the technical scheme that can adopt the embodiment of the invention to provide, webpage is selectively loaded, and Web page loading fast when saving flow is convenient to the user and is browsed.
Preferably, detect the main document whether resource that loads belongs to webpage in the step 101, comprising: obtain the node of resource correspondence in the web document structure of described loading, and the label of described node; Whether the label that detects described node belongs to the label of main document; If the label of described node belongs to the label of main document, then the resource of described loading belongs to the main document of webpage; If the label of described node does not belong to the label of main document, then the resource of described loading does not belong to the main document of webpage.
The embodiment of the invention can detect described resource whether by main document (mainFrame) request of loading when whether the resource that loads being belonged to described main document detect.In the actual treatment, file structure mainly is by HTML (Hypertext Markup Language) (Hyper Text Mark-up Language, HTML) consist of, therefore each resource in the file structure is that the html element has a node (node) corresponding with it in the process of resolving, the corresponding label (frame) of each node.
Therefore, namely can at first obtain the node (node) of this resource correspondence in file structure, and obtain the label (frame) of described node, then whether the label of detection node belongs to the label of described main document, i.e. detection formula node-〉whether document ()-〉 frame==mainFrame () set up.If namely the label of node belongs to the label of main document, then the resource of described loading belongs to the main document of webpage; If the label of described node does not belong to the label of main document, then the resource of described loading does not belong to the main document of webpage.
In a preferred embodiment of the invention, do not affect the purpose of the statement of web page contents when realizing saving flow, the resource that belongs to main document is loaded, and in order further to save flow, the present embodiment also provides following webpage load step in the actual treatment:
The resource that detects described loading belongs to after the main document of webpage, and described method also comprises: resource size and/or resource type to described resource detect, and described resource are carried out the operation that loads or shield according to testing result.
The embodiment of the invention is in order further to save flow, after the resource that detects described loading belongs to the main document of webpage, can also be further the resource size of this resource, resource type etc. be detected, then load this resource or shield this resource according to testing result.In detection, can only detect resource size and resource type wherein each, also can all detect resource size and resource type, and when both detecting, both detection sequentially is not construed as limiting.
Preferably, the resource size of described resource is detected, and according to testing result described resource is carried out and to be loaded or the operation of shielding may further comprise the steps: whether detect the resource size of described resource greater than the resource size threshold value that presets; If described testing result be described resource size greater than the described resource size threshold value that presets, then shield described resource; If described testing result be described resource size less than the described resource size threshold value that presets, then carry out the step of the described resource of described loading.
Resource size threshold value that the present embodiment is pre-configured is used for resource size is limited with to saving flow.The embodiment of the invention is not construed as limiting the resource size threshold value, can be configured according to the difference of equipment, if adopt the equipment such as notebook computer, panel computer, high-end smartphones can configure larger resource size threshold value, then can configure less resource size threshold value for low-end mobile phone.
Thereby when the resource size to described resource detected, whether the resource size that can detect described resource was greater than the resource size threshold value that presets and generate testing result.If testing result be described resource size greater than the described resource size threshold value that presets, illustrate that then this resource is larger, can relatively waste flow if load this resource, therefore can shield this resource, resource is not loaded.
Described testing result be described resource size less than the described resource size threshold value that presets, then explanation loads this resource and can not cause the waste flow, can load this resource this moment, to improve the accuracy of web page contents statement, makes things convenient for the user to browse this webpage.
Preferably, the resource type of described resource is detected, and according to testing result described resource is carried out and to be loaded or may further comprise the steps of the operation of shielding: whether the resource type that detects described resource is streaming media resource; If described testing result is described resource type is streaming media resource, then shield described resource; Be not streaming media resource if described testing result is described resource type, then carry out the step of the described resource of described loading.
The embodiment of the invention does not affect the purpose of the statement of web page contents when realizing saving flow, also resource type is selected, therefore pre-configured streaming media resource.The media resource that streaming media resource refers to adopt the mode of stream transmission to play in the internet.This streaming media resource is the larger resource type of consumed flow, such as resource types such as video, audio frequency and Flash.Thereby when detecting resource type and be streaming media resource, for fear of the waste that causes flow, can shield this resource.And if the resource type of this resource can load this resource when being not streaming media resource.
Preferably, detect described resource type and be after the streaming media resource, described method also comprises: the corresponding picture of a frame that obtains described streaming media resource is the feature picture, and loads described feature picture.This feature picture can be the first frame, first basic frame or any two field picture of this streaming media resource, is used for the content of this streaming media resource of performance.
In the embodiment of the invention, when further saving flow, can shield streaming media resource, this moment is for the content of statement webpage that can be complete, do not affect user's reading, when this streaming media resource is can video or during the resource type such as Flash, the picture corresponding to one frame that can obtain this resource is the feature picture, and in webpage, load this feature picture, then other parts except this feature picture frame in this resource are shielded, thereby namely reached the content of the statement webpage that the purpose of economizing stream again can be complete.
Further, after webpage is parsed, during to user's displayed web page, when if the user wants to check above-mentioned streaming media resource, can click its corresponding feature picture, thereby according to the trigger action of clicking operation to described feature picture, after receiving this trigger action, can load described streaming media resource, make the user can check this resource.
Below, discuss for example a kind of operation steps that loads at webpage:
With reference to Fig. 2, provided the loading method process flow diagram of the webpage that the embodiment of the invention two provides.
Step 201, the resource of obtaining described loading corresponding node in the web document structure, and the label of described node.
Step 202, whether the label that detects described node belongs to the label of main document.
If, execution in step 203 or 204 then; If not, execution in step 206 then.
Whether step 203 detects the resource size of described resource greater than the resource size threshold value that presets.
If not, execution in step 204 or 205 then; If, in execution in step 206.
Step 204, whether the resource type that detects described resource is streaming media resource.
If not, execution in step 205 then; If, in execution in step 206.
As previously mentioned, in detection, can only detect resource size and resource type wherein each, also can all detect resource size and resource type, and when both detecting, both detection sequentially is not construed as limiting.
Step 205 loads described resource.
Step 206 shields described resource.
Wherein, if when the resource type of resource is streaming media resource, a corresponding frame picture that can obtain this resource is the feature picture, then loads this feature picture, and in the shielding resource except this feature picture other parts the corresponding frame.
The technical scheme that above-described embodiment provides webpage resource size and resource type all to be detected in loading, in the actual treatment, after detecting resource and belonging to main document, can also detect first resource type, detect resource size, or only detecting wherein one, the embodiment of the invention is not construed as limiting this.
In sum, the embodiment of the invention can be further detects resource size and/or the resource type of described resource, to determine whether to load this resource after detecting resource and belonging to main document.Thereby can guarantee further to save flow on the complete basis of web page contents statement.
Secondly, for streaming media resource, the picture corresponding to one frame that can load this resource is the feature picture, and in the resource except this feature picture other parts the corresponding frame shield, thereby guarantee the statement of web page contents on the basis of saving flow, after subsequent web pages is parsed, if receive trigger action to described feature picture, then load the corresponding resource of this feature picture, so that the user obtains complete web page contents.
Embodiment three
With reference to Fig. 3, provided the charger structural drawing of the webpage that the embodiment of the invention three provides.
Accordingly, the embodiment of the invention also provides a kind of charger of webpage, comprising: first detection module 31, load and execution module 32.
Wherein: first detection module 31, be used for the process at analyzing web page, detect the main document whether resource that loads belongs to webpage.
Load and execution module 32 is used for loading described resource when the resource that detects described loading belongs to described main document; When the resource that detects described loading does not belong to described main document, shield described resource.
In sum, only the resource type of loading resource is carried out defaultly to reach province stream purpose, can cause web page contents to show imperfect.And the embodiment of the invention is analyzed the importance of resource in the process of analyzing web page, namely detects the resource that loads and whether belongs to described main document, thereby selectively resource is loaded.Then load this resource if resource belongs to described main document, then do not shield this resource if resource does not belong to described main document.Thereby both saved flow, by can be on the statement of web page contents impact, statement web page contents that can be complete, and can promote the user at the reading experience of economizing under the stream mode.
With reference to Fig. 4, provided the charger preferred structure figure of the webpage that the embodiment of the invention three provides.
Preferably, described device also comprises: the second detection module 34 is used for resource size and/or the resource type of described resource are detected;
Described load and execution module 32 is used for described resource being carried out the operation that loads or shield according to testing result.
Preferably, described the second detection module 34 comprises: resource size detects submodule 341.
Described resource size detects submodule 341, for detection of the resource size of described resource whether greater than the resource size threshold value that presets;
Described load and execution module 32, being used in described testing result is described resource size during greater than the described resource size threshold value that presets, and shields described resource; Be described resource size during less than the described resource size threshold value that presets in described testing result, carry out the operation of the described resource of described loading.
Preferably, described the second detection module 34 comprises: resource type detects submodule 342.
Whether described resource type detects submodule 342, be streaming media resource for detection of the resource type of described resource;
Described load and execution module 32, being used in described testing result is described resource type when being streaming media resource, shields described resource; Described testing result be described resource type when the streaming media resource, carry out the operation of the described resource of described loading.
Preferably, described device also comprises: feature picture acquisition module 33.
Described feature picture acquisition module 33, being used in described testing result is described resource type when being streaming media resource, the corresponding picture of a frame that obtains described streaming media resource is the feature picture, and loads described feature picture.
Preferably, described device also comprises: trigger module 35.
Described trigger module 35 is used for triggering described load and execution module 32 when the trigger action that receives described feature picture.
Described load and execution module 32 also is used for loading the corresponding streaming media resource of described feature picture when being triggered.
Preferably, described first detection module 31 comprises: obtain submodule 311 and detection sub-module 312.
The described submodule 311 that obtains, the resource that is used for obtaining described loading is at node corresponding to web document structure, and the label of described node;
Whether described detection sub-module 312 belongs to the label of main document for detection of the label of described node;
Described first detection module 31 is used for judging that the resource of described loading belongs to the main document of webpage when the label of described node belongs to the label of main document; When the label of described node does not belong to the label of main document, judge that the resource of described loading does not belong to the main document of webpage.
In sum, the embodiment of the invention can be further detects resource size and/or the resource type of described resource, to determine whether to load this resource after detecting resource and belonging to main document.Thereby can guarantee further to save flow on the complete basis of web page contents statement.
Secondly, for streaming media resource, the picture corresponding to a frame that can load this resource is the feature picture, streaming media resource shielded, thereby guarantee the statement of web page contents on the basis of saving flow.After subsequent web pages is parsed, if receive trigger action to described feature picture, then load the corresponding resource of described feature picture, so that the user obtains complete web page contents.
For system embodiment because itself and embodiment of the method basic simlarity, so describe fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.
The embodiment of the invention can be described in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment, put into practice the embodiment of the invention, in these distributed computing environment, be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
At last, also need to prove, in this article, relational terms such as the first and second grades only is used for an entity or operation are separated with another entity or operational zone, and not necessarily requires or hint and have the relation of any this reality or sequentially between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby not only comprise those key elements so that comprise process, method, commodity or the equipment of a series of key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, commodity or equipment.In the situation that not more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, commodity or the equipment that comprises described key element and also have other identical element.
Loading method and the device of above a kind of webpage that the embodiment of the invention is provided, be described in detail, used specific case herein principle and the embodiment of the embodiment of the invention are set forth, the explanation of above embodiment just is used for helping to understand method and the core concept thereof of the embodiment of the invention; Simultaneously, for one of ordinary skill in the art, the thought according to the embodiment of the invention all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the embodiment of the invention.

Claims (14)

1. the loading method of a webpage is characterized in that, comprising:
In the process of analyzing web page, detect the main document whether resource that loads belongs to webpage;
Belong to described main document if detect the resource of described loading, then load described resource;
Do not belong to described main document if detect the resource of described loading, then shield described resource.
2. method according to claim 1 is characterized in that, whether the resource that described detection loads belongs to the main document of webpage, comprising:
Obtain the node of resource correspondence in the web document structure of described loading, and the label of described node;
Whether the label that detects described node belongs to the label of main document;
If the label of described node belongs to the label of main document, then the resource of described loading belongs to the main document of webpage;
If the label of described node does not belong to the label of main document, then the resource of described loading does not belong to the main document of webpage.
3. method according to claim 1 is characterized in that, the described resource that detects described loading belongs to after the main document of webpage, and described method also comprises:
Resource size and/or resource type to described resource detect, and described resource are carried out the operation that loads or shield according to testing result.
4. method according to claim 3 is characterized in that, described resource size to described resource detects, and described resource is carried out the operation that loads or shield according to testing result, comprising:
Whether detect the resource size of described resource greater than the resource size threshold value that presets;
If described testing result be described resource size greater than the described resource size threshold value that presets, then carry out the operation of the described resource of shielding;
If described testing result be described resource size less than the described resource size threshold value that presets, then carry out to load the operation of described resource.
5. method according to claim 3 is characterized in that, described resource type to described resource detects, and described resource is carried out the operation that loads or shield according to testing result, comprising:
Whether the resource type that detects described resource is streaming media resource;
If described testing result is described resource type is streaming media resource, then carry out the operation of the described resource of shielding;
Be not streaming media resource if described testing result is described resource type, then carry out the operation that loads described resource.
6. method according to claim 5 is characterized in that, described method also comprises:
If described testing result is described resource type is streaming media resource, the corresponding picture of a frame that then obtains described streaming media resource is the feature picture, and loads described feature picture.
7. method according to claim 6 is characterized in that, described method also comprises:
If receive the trigger action to described feature picture, then load the corresponding streaming media resource of described feature picture.
8. the charger of a webpage is characterized in that, comprising:
First detection module is used for the process at analyzing web page, detects the main document whether resource that loads belongs to webpage;
The load and execution module is used for loading described resource when the resource that detects described loading belongs to described main document; When the resource that detects described loading does not belong to described main document, shield described resource.
9. device according to claim 8 is characterized in that, described first detection module comprises: obtain submodule and detection sub-module;
The described submodule that obtains, the resource that is used for obtaining described loading is at node corresponding to web document structure, and the label of described node;
Whether described detection sub-module belongs to the label of main document for detection of the label of described node;
Described first detection module is used for judging that the resource of described loading belongs to the main document of webpage when the label of described node belongs to the label of main document; When the label of described node does not belong to the label of main document, judge that the resource of described loading does not belong to the main document of webpage.
10. device according to claim 9 is characterized in that, described device also comprises:
The second detection module is used for resource size and/or the resource type of described resource are detected;
Described load and execution module is used for described resource being carried out the operation that loads or shield according to testing result.
11. device according to claim 10 is characterized in that, described the second detection module comprises: the resource size detection sub-module;
Described resource size detection sub-module, for detection of the resource size of described resource whether greater than the resource size threshold value that presets;
Described load and execution module, being used in described testing result is described resource size during greater than the described resource size threshold value that presets, and carries out the operation of the described resource of shielding; Being used in described testing result is described resource size during less than the described resource size threshold value that presets, and carries out the operation that loads described resource.
12. device according to claim 10 is characterized in that, described the second detection module comprises: the resource type detection sub-module;
Whether described resource type detection sub-module is streaming media resource for detection of the resource type of described resource;
Described load and execution module, being used in described testing result is described resource type when being streaming media resource, carries out the operation of the described resource of shielding; Being used in described testing result is described resource type during for streaming media resource, carries out the operation that loads described resource.
13. device according to claim 12 is characterized in that, described device also comprises: feature picture acquisition module;
Described feature picture acquisition module, being used in described testing result is described resource type when being streaming media resource, the corresponding picture of a frame that obtains described streaming media resource is the feature picture, and loads described feature picture.
14. device according to claim 13 is characterized in that, described dress also comprises: trigger module;
Described trigger module is used for triggering described load and execution module when the trigger action that receives described feature picture;
Described load and execution module also is used for loading the corresponding streaming media resource of described feature picture when being triggered.
CN2013102467521A 2013-06-20 2013-06-20 Webpage loading method and device Pending CN103353842A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013102467521A CN103353842A (en) 2013-06-20 2013-06-20 Webpage loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013102467521A CN103353842A (en) 2013-06-20 2013-06-20 Webpage loading method and device

Publications (1)

Publication Number Publication Date
CN103353842A true CN103353842A (en) 2013-10-16

Family

ID=49310216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013102467521A Pending CN103353842A (en) 2013-06-20 2013-06-20 Webpage loading method and device

Country Status (1)

Country Link
CN (1) CN103353842A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035977A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Webpage loading method and device
CN104111980A (en) * 2014-06-26 2014-10-22 小米科技有限责任公司 Method and device for extracting webpage content and terminal
CN104731808A (en) * 2013-12-20 2015-06-24 腾讯科技(深圳)有限公司 Browser webpage loading method and browser webpage loading device
CN105893598A (en) * 2016-04-20 2016-08-24 上海斐讯数据通信技术有限公司 Method and device for downloading pictures from mobile terminal
CN106155654A (en) * 2015-04-03 2016-11-23 阿里巴巴集团控股有限公司 Method, device and the electronic equipment of shielding web page operation
CN106685851A (en) * 2016-12-20 2017-05-17 深圳市金立通信设备有限公司 Data traffic control method and terminal
CN111224880A (en) * 2019-12-31 2020-06-02 北京健康之家科技有限公司 Interface data acquisition method and device for single-page application and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867593A (en) * 2010-02-03 2010-10-20 宇龙计算机通信科技(深圳)有限公司 Network access control method, network access control system and network access terminal
CN102156737A (en) * 2011-04-12 2011-08-17 华中师范大学 Method for extracting subject content of Chinese webpage
CN102270206A (en) * 2010-06-03 2011-12-07 北京迅捷英翔网络科技有限公司 Method and device for capturing valid web page contents
US8196036B2 (en) * 2007-02-16 2012-06-05 Esobi, Inc. Method and system for converting hypertext markup language web page to plain text
CN102929871A (en) * 2011-08-08 2013-02-13 腾讯科技(深圳)有限公司 Webpage browsing method and device and mobile terminal
CN102955852A (en) * 2012-11-01 2013-03-06 北京小米科技有限责任公司 Method, device and equipment for webpage resource processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8196036B2 (en) * 2007-02-16 2012-06-05 Esobi, Inc. Method and system for converting hypertext markup language web page to plain text
CN101867593A (en) * 2010-02-03 2010-10-20 宇龙计算机通信科技(深圳)有限公司 Network access control method, network access control system and network access terminal
CN102270206A (en) * 2010-06-03 2011-12-07 北京迅捷英翔网络科技有限公司 Method and device for capturing valid web page contents
CN102156737A (en) * 2011-04-12 2011-08-17 华中师范大学 Method for extracting subject content of Chinese webpage
CN102929871A (en) * 2011-08-08 2013-02-13 腾讯科技(深圳)有限公司 Webpage browsing method and device and mobile terminal
CN102955852A (en) * 2012-11-01 2013-03-06 北京小米科技有限责任公司 Method, device and equipment for webpage resource processing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘延军: "精打细算,节约上网流量费", 《电脑爱好者合订本》 *
张宝: "多媒体课件制作", 《中小学教师实用信息技术教程》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731808A (en) * 2013-12-20 2015-06-24 腾讯科技(深圳)有限公司 Browser webpage loading method and browser webpage loading device
WO2015090178A1 (en) * 2013-12-20 2015-06-25 Tencent Technology (Shenzhen) Company Limited Web page loading methods and devices implementing the same
CN104035977A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Webpage loading method and device
CN104035977B (en) * 2014-05-23 2018-06-19 小米科技有限责任公司 Webpage loading method and device
CN104111980A (en) * 2014-06-26 2014-10-22 小米科技有限责任公司 Method and device for extracting webpage content and terminal
CN104111980B (en) * 2014-06-26 2017-07-28 小米科技有限责任公司 Extracting method, device and the terminal of web page contents
CN106155654A (en) * 2015-04-03 2016-11-23 阿里巴巴集团控股有限公司 Method, device and the electronic equipment of shielding web page operation
CN106155654B (en) * 2015-04-03 2020-06-16 阿里巴巴集团控股有限公司 Method and device for shielding webpage operation and electronic equipment
CN105893598A (en) * 2016-04-20 2016-08-24 上海斐讯数据通信技术有限公司 Method and device for downloading pictures from mobile terminal
CN106685851A (en) * 2016-12-20 2017-05-17 深圳市金立通信设备有限公司 Data traffic control method and terminal
CN111224880A (en) * 2019-12-31 2020-06-02 北京健康之家科技有限公司 Interface data acquisition method and device for single-page application and storage medium

Similar Documents

Publication Publication Date Title
TWI690812B (en) Method, device and client for dynamic layout of page elements
CN103353842A (en) Webpage loading method and device
KR102436987B1 (en) Method and terminal device for extracting web page content
CN102819555B (en) A kind of method and apparatus carrying out recommendation information loading in the reading model of webpage
CN102799372B (en) A kind of method for uploading of pictorial information and upload device
CN105302811B (en) Browser page skipping method and device
CN101853158A (en) Method and device for adjusting Widget window
US20180293210A1 (en) Method and device for processing web page content
CN105786455B (en) Data processing method and device and terminal
CN102819561A (en) Picture display method and device based on webpage
CN103577479B (en) Web page contents display packing and system
CN109522018A (en) Page processing method, device and storage medium
US20170031871A1 (en) Method of and system for processing content of a web resource in a browser application
CN104077273A (en) Method and device for extracting webpage contents
CN106909361A (en) Web development approaches and device based on masterplate engine
CN104426944A (en) Method and device for information feedback, and terminal
CN101937308A (en) Webpage content browsing method based on mobile terminal and device thereof
US20180011933A1 (en) Method, apparatus, and server for generating hotspot content
CN110298000A (en) Acquisition methods, terminal device and the medium of page parameter
CN113268260A (en) Routing method and device for web front end
CN110390063A (en) A kind of data analysis method, device, medium and electronic equipment
Ghasemisharif et al. Speedreader: Reader mode made fast and private
CN110674444B (en) Method and terminal for downloading dynamic webpage
CN103885878A (en) Method and device for generating browser testing script
CN104808913A (en) Event responding 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
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100085, Beijing, Wangjing, Chaoyang District West Road, No. 50, volume stone world building, block A, 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

RJ01 Rejection of invention patent application after publication

Application publication date: 20131016

RJ01 Rejection of invention patent application after publication