CN109032924A - Identify method, apparatus, equipment and the storage medium of resource type in the page - Google Patents
Identify method, apparatus, equipment and the storage medium of resource type in the page Download PDFInfo
- Publication number
- CN109032924A CN109032924A CN201810652209.4A CN201810652209A CN109032924A CN 109032924 A CN109032924 A CN 109032924A CN 201810652209 A CN201810652209 A CN 201810652209A CN 109032924 A CN109032924 A CN 109032924A
- Authority
- CN
- China
- Prior art keywords
- type
- resource
- file
- determined
- actual types
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
The invention discloses method, apparatus, equipment and the storage mediums of resource type in a kind of identification page.Wherein method includes the resources-type performance data obtained in the page to be tested, the field information of the resource file type comprising characterization page load resource in the resources-type performance data;It parses the field information and obtains resource file type;The actual types of resource are determined according to the resource file type and pre-set set of file.Technical solution according to an embodiment of the present invention, can determine the real type of resource in the page, to improve the accuracy of page performance evaluation.
Description
Technical field
The present embodiments relate to Internet technical field more particularly to it is a kind of identification the page in resource type method,
Device, equipment and storage medium.
Background technique
The performance issue of the page is always the important ring in internet product development process, and many companies also make always
The page performance of product is monitored in various manners.From console tool, packet catcher, to using DOMContentLoaded and
Document.onreadystatechange, then arrive using third party's tool such as WebPagetest, Pingdom etc. by not
Same browser environment and region is tested to seek Optimizing Suggestions etc., these modes are not only troublesome, and the finger measured
It marks relatively simple.If there is some application programming interfaces that us can be helped to directly acquire page performance information
(Application Programming Interface, API) occurs, and becomes standard and supported by browser manufacturer, that property
Can monitor can or can not be another width blueprint again.
Fortunately World Wide Web Consortium (World Wide Web Consortium, W3C) web performance group and each browsing
Device manufacturer all has recognized that the importance that performance develops web, and in order to solve the difficulty of current performance test, W3C is proposed
Nowadays a set of performance API standard, various browsers also gradually mature the support of this set standard.The purpose of this set API is
Simplify the process that developer carries out Accurate Analysis and control to web site performance, facilitates developer that means is taken to improve web performance.
Wherein, W3C is proposed the standard criterion draft of a resource timing, which is web application definition
One group interface, by calling this interface to go to carry out performance evaluation, but the returned data result of this interface is not necessarily
Real resource type, such as the background picture resource in cascading style sheets (Cascading Style Sheets, CSS),
Its actual types are jpg, but what is returned by the interface is CSS type, thus will affect the accuracy of performance evaluation.
Summary of the invention
In view of drawbacks described above in the prior art or deficiency, be intended to provide a kind of method of resource type in the identification page,
Device, equipment and storage medium, can determine the real type of resource in the page, to improve the accurate of page performance evaluation
Property.
In a first aspect, the embodiment of the present invention provides a kind of method for identifying resource type in the page, comprising:
The resources-type performance data in the page to be tested is obtained, includes characterization page load in the resources-type performance data
The field information of the resource file type of resource;
It parses the field information and obtains resource file type;
The actual types of resource are determined according to the resource file type and pre-set set of file.
Second aspect, the embodiment of the present invention also provide a kind of device for identifying resource type in the page, comprising:
Data obtaining module, for obtaining the resources-type performance data in the page to be tested, the resources-type performance data
In comprising characterization the page load resource resource file type field information;
File type analyzing module obtains resource file type for parsing the field information;
Resource type determining module, for determining money according to the resource file type and pre-set set of file
The actual types in source.
The third aspect, the embodiment of the present invention also provide a kind of equipment, comprising:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of places
It manages device and executes method described in first aspect of the embodiment of the present invention.
Fourth aspect, the embodiment of the present invention also provide a kind of computer readable storage medium for being stored with computer program,
Method described in first aspect of the embodiment of the present invention is realized when the program is executed by processor.
The technical solution provided according to embodiments of the present invention, by obtaining the resources-type performance data in the page to be tested,
Field information by parsing the resource file type that the characterization page for including in the resources-type performance data loads resource obtains
To resource file type, the true of resource is further determined according to the resource file type and pre-set set of file
The actual types of resource can be recognized accurately in type.To improve the accuracy of page performance evaluation.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is the flow diagram for identifying the method for resource type in the page that the embodiment of the present invention one provides;
Fig. 2 is the structural schematic diagram of the device of resource type in the identification page provided by Embodiment 2 of the present invention;
Fig. 3 is the structural schematic diagram for the equipment that the embodiment of the present invention three provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase
Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
Embodiment one
Fig. 1 is the flow diagram for identifying the method for resource type in the page that the embodiment of the present invention one provides, this implementation
Example executing subject, can for it is provided in an embodiment of the present invention identification the page in resource type device, the device can integrate in
Mobile terminal device (for example, smart phone, tablet computer etc.), also can integrate in fixed terminal (desktop computer) or server
In, the device of resource type can use hardware or software realization in the identification page.It is illustrated below in conjunction with embodiment,
As shown in Figure 1, specifically including:
S101, resources-type performance data in the page to be tested is obtained, includes characterization page in the resources-type performance data
Face loads the field information of the resource file type of resource.
Wherein, the character string comprising characterization resource file type in field information, is specifically as follows the network address of load resource,
Or the field comprising resource file type.
A kind of concrete mode that realizing this step is to send and instruct to the page to be tested, is obtained by the instruction resources-type
Performance data.
Resources-type performance data is obtained specifically, can instruct by windows.performance.getEntries ().
Optionally, before sending instruction to the page to be tested, this implementation may also include opens webpage to be tested as follows
Correlation step: a chrome browser is opened by chrome-launcher, is assisted by chrome-remote-interface
View calls chrome browser, opens page jump and monitors, invoking page jumps interface, opens webpage to be tested.
S102, the parsing field information obtain resource file type.
Wherein, resource file type include but is not limited to it is following any one: jpg, jpeg, png, git, webp, svg,
Ico, js, css, html, woff, woff2, ttf, eot, otf, swf and map.
It optionally, include name field in the field information, wherein name field includes at least one character string.Accordingly
, a kind of concrete mode for realizing this step are as follows: the character string for including in the name field is identified;It is tied according to identification
Fruit determines resource file type.
Further, according to recognition result determine resource file type can point the following two kinds situation realize:
The first situation illustrates in the name field not if not including http character string in the name field
Comprising website information, then character string cutting is carried out to the name field, obtains the character string of characterization resource file type;According to
The character string determines resource file type.Specifically, by name field use ": " cutting, resource file type is usually first
Section character string.Such as name field is jpg:aaaaa, two sections of character strings of jpg and aaaaa is cut into, then can determine whether resource
File type is first segment character string jpg.
Second situation illustrates that then name field is resource for this if in the name field including http character string
Network address, then go matching web site information according to regular expression;Resource file type is determined according to matching result.For example, canonical
Expression formula be chosen as "/:// ([^ /]+) ([^ ?] *)?? (.*)/", gone to match following network address with it:
://www.waitsun.com/wp-content/themes/QstM/static/css/bootstrap.m
In.css? ver=1.112
Following matching result can be obtained:
://www.waitsun.com/wp-content/themes/QstM/static/css/bootstrap.m
In.css? ver=1.112
www.waitsun.com
/wp-content/themes/QstM/static/css/bootstrap.min.css
Ver=1.112
Then the character string for taking third section to be matched to goes to cut according to "/" symbol, returns to final stage character string, that is, css,
The css is resource file type.
S103, the actual types that resource is determined according to the resource file type and pre-set set of file.
Wherein, set of file can be one or more, contain at least one file type in each set of file,
This document type include but is not limited to it is following any one: jpg, jpeg, png, git, webp, svg, ico, js, css, html,
Woff, woff2, ttf, eot, otf, swf and map.
Before the execution of this step, the common type of resource can be loaded in statistical web page in advance, is then classified to obtain
At least one set of file, and the corresponding relationship between set of file and the actual types of resource is established, this step is specific
When realization, the actual types of resource can be determined according to the corresponding relationship.For example, as shown in following table one, which can be with
The form of list exists:
Table one
About this step, one of optional implementation is, if the resource file type is any one wherein
In a set of file, then the actual types of resource are determined according to the set of file at place.Specifically, can be according to presetting
Set of file and resource actual types between corresponding relationship, for example, inquiring the actual types that above-mentioned table one determines resource.
For example, if the resource file type is in the first set of file, it is determined that the actual types of resource are
Image type;If the resource file type is in the second set of file, it is determined that the actual types of resource are js class
Type;If the resource file type is in third set of file, it is determined that the actual types of resource are css type;If
The resource file type is in the 4th set of file, it is determined that the actual types of resource are html type;If the money
Source file type is in the 5th set of file, it is determined that the actual types of resource are font type;If the resource file
Type is in the 6th set of file, it is determined that the actual types of resource are flash type;If the resource file type exists
In 7th set of file, it is determined that the actual types of resource are source-map type.
Wherein optionally implementation is another kind, if resource file type is not in any one above-mentioned set of file
In, then the actual types that type determines resource are initiated according to the resource.Wherein, resource initiates type and is included in resources-type performance
In data, i.e., when obtaining the resources-type performance data in the page to be tested, resource can be obtained and initiate type.
Wherein, resource initiate type include but is not limited to it is following any one: xmlhttprequest, img, script,
Internal and iframe.
Optionally, if it is xmlhttprequest type that the resource, which initiates type, it is determined that the actual types of resource
For ajax type;If it is img type that the resource, which initiates type, it is determined that the actual types of resource are image type;If
It is script type that the resource, which initiates type, it is determined that the actual types of resource are js type;If the resource initiates class
Type is any one in internal and iframe type, it is determined that the actual types of resource are html type.
Wherein optionally implementation is another kind, if initiating type according to the resource file type and the resource
The actual types that not can determine that resource, then be identified as other type for the actual types of resource.
The embodiment of the present invention is by obtaining the resources-type performance data in the page to be tested, by parsing the resources-type property
The field information of the resource file type for the characterization page load resource for including in energy data obtains resource file type, further
The actual types that resource is determined according to the resource file type and pre-set set of file, can accurately identify investment
The actual types in source.To improve the accuracy of page performance evaluation.
Embodiment two
Fig. 2 is the structural schematic diagram of the device of resource type in the identification page provided by Embodiment 2 of the present invention, the device
It can integrate in mobile terminal device (for example, smart phone, tablet computer etc.), also can integrate in fixed terminal (desktop
Brain) or server in, the device of resource type can use hardware or software realization in the identification page.Below in conjunction with implementation
Example is illustrated, as shown in Fig. 2, specifically including: data obtaining module 201, file type analyzing module 202 and resource type are true
Cover half block 203;
Data obtaining module 201 is used to obtain the resources-type performance data in the page to be tested, the resources-type performance number
The field information of resource file type comprising characterization page load resource in;
File type analyzing module 202 obtains resource file type for parsing the field information;
It optionally, include name field in the field information;Correspondingly, the files classes parsing module 202 includes: word
Symbol string recognition unit and file type determination unit;
Wherein, character string recognition unit is for identifying the character string for including in the name field;
Wherein, file type determination unit is used to determine resource file type according to recognition result.
Further, the file type determination unit is specifically used for: if not including http word in the name field
Symbol string, then carry out character string cutting to the name field, obtains the character string of characterization resource file type;According to the character
It goes here and there and determines resource file type.Or, going to match according to regular expression if including http character string in the name field
Website information;Resource file type is determined according to matching result.
Resource type determining module 203 is used to be determined according to the resource file type and pre-set set of file
The actual types of resource.
Optionally, the resource type determining module 203 is specifically used for: if the resource file type is any wherein
In one set of file, then the actual types of resource are determined according to the set of file at place.
Further, the resource type determining module 203 is specifically used for: if the resource file type is in the first text
In part type group, it is determined that the actual types of resource be image type, wherein in first set of file comprising jpg,
At least one of jpeg, png, git, webp, svg and ico type;If the resource file type is in the second file type
In group, it is determined that the actual types of resource are js type, wherein including js type in second set of file;If described
Resource file type is in third set of file, it is determined that the actual types of resource are css type, wherein the third file
It include css type in type group;If the resource file type is in the 4th set of file, it is determined that the true class of resource
Type is html type, wherein including html type in the 4th set of file;If the resource file type is the 5th
In set of file, it is determined that the actual types of resource be font type, wherein in the 5th set of file comprising woff,
At least one of woff2, ttf, eot and otf type;If the resource file type in the 6th set of file,
The actual types for determining resource are flash type, wherein including swf type in the 6th set of file;If the money
Source file type is in the 7th set of file, it is determined that the actual types of resource are source-map type, wherein described the
It include map type in seven set of file.
Optionally, type also is initiated comprising resource in the resources-type performance data;
Correspondingly, the resource type determining module 203 is specifically used for: if the resource file type is not any one
In a set of file, then the actual types that type determines resource are initiated according to the resource.
Further, the resource type determining module 203 is specifically used for: being if the resource initiates type
Xmlhttprequest type, it is determined that the actual types of resource are ajax type;If it is img class that the resource, which initiates type,
Type, it is determined that the actual types of resource are image type;If it is script type that the resource, which initiates type, it is determined that money
The actual types in source are js type;If it is any one in internal and iframe type that the resource, which initiates type,
The actual types for then determining resource are html type.
Optionally, the resource type determining module 203 is also used to: if according to the resource file type and the money
Type is initiated in source not can determine that the actual types of resource, then the actual types of resource is identified as other type.
It should be appreciated that each step in all modules and unit recorded in the embodiment of the present invention and the method for Fig. 1 description
It is corresponding.It is equally applicable to the device above with respect to the operation and feature of method description as a result, details are not described herein.The device
It can realize in advance in the browser of electronic equipment or other security applications, electricity can also be loaded by modes such as downloadings
In the browser of sub- equipment or its security application.Corresponding module in the device can cooperate with the unit in electronic equipment
To realize the scheme of the embodiment of the present invention.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for equipment that the embodiment of the present invention three provides, and it illustrates be suitable for being used to realizing this
The structural schematic diagram of the equipment of inventive embodiments.
It, can be according to being stored in read-only memory as shown in figure 3, the equipment includes central processing unit (CPU) 301
(ROM) it the program in 302 or is executed respectively from the program that storage section 308 is loaded into random access storage device (RAM) 303
Kind movement appropriate and processing.In RAM 303, it is also stored with various programs and data needed for system operatio.CPU 301,
ROM 302 and RAM 303 is connected with each other by bus 304.Input/output (I/O) interface 305 is also connected to bus 304.
I/O interface 305 is connected to lower component: the importation 306 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 307 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 308 including hard disk etc.;
And the communications portion 309 of the network interface card including LAN card, modem etc..Communications portion 309 via such as because
The network of spy's net executes communication process.Driver 310 is also connected to I/O interface 305 as needed.Detachable media 311, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 310, in order to read from thereon
Computer program be mounted into storage section 308 as needed.
Particularly, disclosed embodiment, the process of figure 1 above description may be implemented as computer software according to the present invention
Program.For example, the embodiment of the present invention includes a kind of computer program product comprising be tangibly embodied in machine readable media
On computer program, the computer program includes program code for executing the method for Fig. 1.In such embodiment
In, which can be downloaded and installed from network by communications portion 309, and/or from 311 quilt of detachable media
Installation.
Flow chart and block diagram in attached drawing are illustrated according to the device of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in the embodiment of the present invention involved unit or module can be realized by way of software, can also be with
It is realized by way of hardware.Described unit or module also can be set in the processor, for example, can be described as:
A kind of processor includes address acquisition module and abnormal determination module.Wherein, the title of these units or module is in certain situation
Under do not constitute restriction to the unit or module itself, for example, address acquisition module is also described as " for obtaining ground
The module of location ".
As on the other hand, the present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums
Matter can be computer readable storage medium included in device described in above-described embodiment;It is also possible to individualism, not
The computer readable storage medium being fitted into equipment.Computer-readable recording medium storage has one or more than one journey
Sequence, described program is used to execute by one or more than one processor is described in resource type in the identification page of the invention
Method.
Above description is only presently preferred embodiments of the present invention and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the present invention, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the present invention
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (20)
1. a kind of method of resource type in identification page, which is characterized in that the described method includes:
The resources-type performance data in the page to be tested is obtained, includes characterization page load resource in the resources-type performance data
Resource file type field information;
It parses the field information and obtains resource file type;
The actual types of resource are determined according to the resource file type and pre-set set of file.
2. the method according to claim 1, wherein described according to the resource file type and pre-set
Set of file determines the actual types of resource, comprising:
If the resource file type in wherein any one set of file, is determined according to the set of file at place
The actual types of resource.
3. according to the method described in claim 2, it is characterized in that, the set of file according to place determines the true of resource
Real type, comprising:
If the resource file type is in the first set of file, it is determined that the actual types of resource are image type,
Described in include at least one of jpg, jpeg, png, git, webp, svg and ico type in the first set of file;
If the resource file type is in the second set of file, it is determined that the actual types of resource are js type, wherein
It include js type in second set of file;
If the resource file type is in third set of file, it is determined that the actual types of resource are css type, wherein
It include css type in the third set of file;
If the resource file type is in the 4th set of file, it is determined that the actual types of resource are html type,
Described in include html type in the 4th set of file;
If the resource file type is in the 5th set of file, it is determined that the actual types of resource are font type,
Described in include at least one of woff, woff2, ttf, eot and otf type in the 5th set of file;
If the resource file type is in the 6th set of file, it is determined that the actual types of resource are flash type,
Described in include swf type in the 6th set of file;
If the resource file type is in the 7th set of file, it is determined that the actual types of resource are source-map class
Type, wherein including map type in the 7th set of file.
4. the method according to claim 1, wherein also initiating class comprising resource in the resources-type performance data
Type;
Correspondingly, the actual types that resource is determined according to the resource file type and pre-set set of file,
Include:
If the resource file type not in any one set of file, initiates type according to the resource and determines money
The actual types in source.
5. according to the method described in claim 4, it is characterized in that, described determine the true of resource according to resource initiation type
Real type, comprising:
If it is xmlhttprequest type that the resource, which initiates type, it is determined that the actual types of resource are ajax type;
If it is img type that the resource, which initiates type, it is determined that the actual types of resource are image type;
If it is script type that the resource, which initiates type, it is determined that the actual types of resource are js type;
If it is any one in internal and iframe type that the resource, which initiates type, it is determined that the true class of resource
Type is html type.
6. according to the method described in claim 4, it is characterized in that, the method also includes:
It, will money if initiating type according to the resource file type and the resource not can determine that the actual types of resource
The actual types in source are identified as other type.
7. method according to claim 1-6, which is characterized in that include name field in the field information;
Correspondingly, the parsing field information obtains resource file type, comprising:
The character string for including in the name field is identified;
Resource file type is determined according to recognition result.
8. being wrapped the method according to the description of claim 7 is characterized in that described determine resource file type according to recognition result
It includes:
If not including http character string in the name field, character string cutting is carried out to the name field, obtains table
Levy the character string of resource file type;
Resource file type is determined according to the character string.
9. being wrapped the method according to the description of claim 7 is characterized in that described determine resource file type according to recognition result
It includes:
If including http character string in the name field, matching web site information is gone according to regular expression;
Resource file type is determined according to matching result.
10. the device of resource type in a kind of identification page, which is characterized in that described device includes:
Data obtaining module wraps in the resources-type performance data for obtaining the resources-type performance data in the page to be tested
The field information of the resource file type of the load resource of the page containing characterization;
File type analyzing module obtains resource file type for parsing the field information;
Resource type determining module, for determining resource according to the resource file type and pre-set set of file
Actual types.
11. device according to claim 10, which is characterized in that the resource type determining module is specifically used for:
If the resource file type in wherein any one set of file, is determined according to the set of file at place
The actual types of resource.
12. device according to claim 11, which is characterized in that the resource type determining module is specifically used for:
If the resource file type is in the first set of file, it is determined that the actual types of resource are image type,
Described in include at least one of jpg, jpeg, png, git, webp, svg and ico type in the first set of file;If
The resource file type is in the second set of file, it is determined that the actual types of resource are js type, wherein described second
It include js type in set of file;If the resource file type is in third set of file, it is determined that resource it is true
Real type is css type, wherein including css type in the third set of file;If the resource file type is
In four set of file, it is determined that the actual types of resource are html type, wherein including in the 4th set of file
Html type;If the resource file type is in the 5th set of file, it is determined that the actual types of resource are font class
Type, wherein including at least one of woff, woff2, ttf, eot and otf type in the 5th set of file;If institute
Resource file type is stated in the 6th set of file, it is determined that the actual types of resource are flash type, wherein the described 6th
It include swf type in set of file;If the resource file type is in the 7th set of file, it is determined that resource it is true
Real type is source-map type, wherein including map type in the 7th set of file.
13. device according to claim 10, which is characterized in that also initiated comprising resource in the resources-type performance data
Type;
Correspondingly, the resource type determining module is specifically used for:
If the resource file type not in any one set of file, initiates type according to the resource and determines money
The actual types in source.
14. device according to claim 13, which is characterized in that the resource type determining module is specifically used for:
If it is xmlhttprequest type that the resource, which initiates type, it is determined that the actual types of resource are ajax type;
If it is img type that the resource, which initiates type, it is determined that the actual types of resource are image type;If the resource hair
Playing type is script type, it is determined that the actual types of resource are js type;If the resource initiates type
Any one in internal and iframe type, it is determined that the actual types of resource are html type.
15. device according to claim 13, which is characterized in that the resource type determining module is also used to:
It, will money if initiating type according to the resource file type and the resource not can determine that the actual types of resource
The actual types in source are identified as other type.
16. the described in any item devices of 0-15 according to claim 1, which is characterized in that include name word in the field information
Section;
Correspondingly, the files classes parsing module, comprising:
Character string recognition unit, for being identified to the character string for including in the name field;
File type determination unit, for determining resource file type according to recognition result.
17. device according to claim 16, which is characterized in that the file type determination unit is specifically used for:
If not including http character string in the name field, character string cutting is carried out to the name field, obtains table
Levy the character string of resource file type;Resource file type is determined according to the character string.
18. device according to claim 16, which is characterized in that the file type determination unit is specifically used for:
If including http character string in the name field, matching web site information is gone according to regular expression;According to matching
As a result resource file type is determined.
19. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors
Execute method as claimed in any one of claims 1-9 wherein.
20. a kind of computer readable storage medium for being stored with computer program, which is characterized in that the program is executed by processor
Shi Shixian method as claimed in any one of claims 1-9 wherein.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810652209.4A CN109032924A (en) | 2018-06-22 | 2018-06-22 | Identify method, apparatus, equipment and the storage medium of resource type in the page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810652209.4A CN109032924A (en) | 2018-06-22 | 2018-06-22 | Identify method, apparatus, equipment and the storage medium of resource type in the page |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109032924A true CN109032924A (en) | 2018-12-18 |
Family
ID=64610480
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810652209.4A Pending CN109032924A (en) | 2018-06-22 | 2018-06-22 | Identify method, apparatus, equipment and the storage medium of resource type in the page |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109032924A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110399737A (en) * | 2019-07-26 | 2019-11-01 | 博雅创智(天津)科技有限公司 | A kind of web site contents guard method of non-intrusion type |
CN111159709A (en) * | 2019-12-27 | 2020-05-15 | 深信服科技股份有限公司 | File type identification method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101477535A (en) * | 2008-12-30 | 2009-07-08 | 华为技术有限公司 | Web page display method, request processing method, apparatus and system |
US20150350370A1 (en) * | 2014-06-03 | 2015-12-03 | Viasat, Inc. | Server-machine-driven hint generation for improved web page loading using client-machine-driven feedback |
-
2018
- 2018-06-22 CN CN201810652209.4A patent/CN109032924A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101477535A (en) * | 2008-12-30 | 2009-07-08 | 华为技术有限公司 | Web page display method, request processing method, apparatus and system |
US20150350370A1 (en) * | 2014-06-03 | 2015-12-03 | Viasat, Inc. | Server-machine-driven hint generation for improved web page loading using client-machine-driven feedback |
Non-Patent Citations (2)
Title |
---|
云深不知处: "JavaScript根据文件名判断文件类型", 《HTTPS://WWW.CNBLOGS.COM/DIGE1993/P/4774236.HTML》 * |
孙首富: "前端性能监控方案window.performance 调研(转)", 《HTTPS://WWW.CNBLOGS.COM/SUNSHQ/P/5312231.HTML》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110399737A (en) * | 2019-07-26 | 2019-11-01 | 博雅创智(天津)科技有限公司 | A kind of web site contents guard method of non-intrusion type |
CN111159709A (en) * | 2019-12-27 | 2020-05-15 | 深信服科技股份有限公司 | File type identification method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018223717A1 (en) | Webpage front-end testing method, device, system, apparatus and readable storage medium | |
EP3518124A1 (en) | Webpage rendering method and related device | |
CN102819561B (en) | Picture display method and device based on webpage | |
US20150227276A1 (en) | Method and system for providing an interactive user guide on a webpage | |
CN107133165B (en) | Browser compatibility detection method and device | |
US20130298233A1 (en) | Web page falsification detection apparatus and storage medium | |
CN105426508A (en) | Webpage generation method and apparatus | |
CN106951495A (en) | Method and apparatus for information to be presented | |
US20220121668A1 (en) | Method for recommending document, electronic device and storage medium | |
CN110968314B (en) | Page generation method and device | |
CN105635284A (en) | Page display method and terminal | |
US20060059247A1 (en) | Automatic simultaneous entry of values in multiple web page fields | |
CN109032924A (en) | Identify method, apparatus, equipment and the storage medium of resource type in the page | |
CN111881183A (en) | Enterprise name matching method and device, storage medium and electronic equipment | |
CN104899203B (en) | Webpage generation method and device and terminal equipment | |
CN111552463A (en) | Page jump method and device, computer equipment and storage medium | |
CN107451163B (en) | Animation display method and device | |
CN113869789A (en) | Risk monitoring method and device, computer equipment and storage medium | |
CN105243134B (en) | A kind of method and apparatus handling browser of being held as a hostage | |
CN105354490A (en) | Method and device for processing hijacked browser | |
US8751508B1 (en) | Contextual indexing of applications | |
CN104834589A (en) | Webpage detection method and device | |
US11157590B2 (en) | Script logging for markup language elements | |
CN115759029A (en) | Document template processing method and device, electronic equipment and storage medium | |
CN103218358A (en) | Diff scoring method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181218 |
|
RJ01 | Rejection of invention patent application after publication |