CN104899131A - Detection method and device of webpage loading in browser, and mobile terminal - Google Patents

Detection method and device of webpage loading in browser, and mobile terminal Download PDF

Info

Publication number
CN104899131A
CN104899131A CN201410077457.2A CN201410077457A CN104899131A CN 104899131 A CN104899131 A CN 104899131A CN 201410077457 A CN201410077457 A CN 201410077457A CN 104899131 A CN104899131 A CN 104899131A
Authority
CN
China
Prior art keywords
browser
value
height value
webpage
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410077457.2A
Other languages
Chinese (zh)
Other versions
CN104899131B (en
Inventor
黄坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410077457.2A priority Critical patent/CN104899131B/en
Publication of CN104899131A publication Critical patent/CN104899131A/en
Application granted granted Critical
Publication of CN104899131B publication Critical patent/CN104899131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a detection method and device of webpage loading in a browser, and a mobile terminal. The method comprises the following steps: when a situation that the browser initiates a network connection request to a website is detected, determining the time when the network connection request is initiated as an initial time value; receiving webpage resource data returned when the website responds to the network connection request, and detecting a height value of a webpage body in a webpage loading process of the webpage resource data; and if the height value of the webpage body is not smaller than a configured visible screen height value, determining the current time as a terminal time value, and recoding the initial time value and the terminal time value. The detection method and device can quickly and automatically obtain a webpage loading duration of the browser, meets the automation and intelligentization requirements of browser development and test users on tests for browser performance and the like, brings convenience for a background server and the like to mine potential rules and information, determines the browser performance and optimizes the websites corresponding to certain uniform resource locators.

Description

A kind of detection method, device and mobile terminal that webpage in browser is loaded
Technical field
The present invention relates to Computer Applied Technology field, particularly relate to a kind of detection method to webpage loading in browser and device.
Background technology
Browser is a kind of conventional application software, and it is for the file in display web page server or archives economy, and the file realizing user and display is interactive.Browser specifically may be displayed on the word, image and other information that exist in the network such as world wide web or LAN.The webpage of browser is generally the form of HTML (Hypertext Markup Language).At present, the browser of mobile terminal existed in the intelligent mobile terminals such as mobile phone, panel computer, intelligent wearable device runs on mobile terminals, can GPRS(General Packet Radio Service be passed through, general packet radio service technology) carry out surfing the web internet content.
When using browser browsing pages on the mobile apparatus, from user the link of mobile phone screen webpage clicking, to browser page represent related pages content and the moment being paved with the whole screen of mobile terminal only, it is the important indicator weighing browser of mobile terminal performance and Consumer's Experience at present that this section loads duration.
The judgement of existing mobile phone browser first screen time mostly adopts shooting recording is carried out to mobile phone page loading procedure, then after the video of shooting evenly being gathered sub-frame processing according to the video time of carrying out, obtain the picture of different time points, then by manually going the performance evaluation process identifying and processed browser of mobile terminal.The operation of this performance evaluation process is loaded down with trivial details, treatment effeciency is low.
Summary of the invention
Embodiment of the present invention technical matters to be solved is, provides a kind of detection method to webpage loading in browser and device, can obtain the loading duration of browser to webpage automatically, quickly.
In order to solve the problems of the technologies described above, embodiments provide a kind of detection method that webpage in browser is loaded, comprising:
When detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value;
Receive described website and respond the web page resources data that described network connecting request returns, and detect the height value to webpage main body in the web page loading process of described web page resources data;
If the height value of described webpage main body is not less than the Xian height of the local terminal screen recorded, current time is defined as termination time value, and records described initial time value and described termination time value.
Correspondingly, the embodiment of the present invention additionally provides a kind of pick-up unit loaded webpage in browser, comprising:
Determination module, for when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value;
Detection module, responds for receiving described website the web page resources data that described network connecting request returns, and detects the height value to webpage main body in the web page loading process of described web page resources data;
Logging modle, if be not less than for the height value of described webpage main body the screen configured can show height value, be defined as termination time value, and record described initial time value and described termination time value by current time.
Correspondingly, the embodiment of the present invention additionally provides a kind of mobile terminal, comprises communicator and processor,
Described communicator, for website communication;
Described processor, for when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value; Receive described website and respond the web page resources data that described network connecting request returns, and detect the height value to webpage main body in the web page loading process of described web page resources data; If the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and records described initial time value and described termination time value.
The embodiment of the present invention initiates the initial time of network connecting request by record, and highly determine that browser completes the termination time of webpage loading by the height of page main body and the corresponding display of terminal screen, automatically the acquisition of first screen time, is achieved quickly, improve acquisition of first screen time efficiency, meet the robotization that Development of Web Browser and test subscriber test browser performance etc., intelligent demand, and save cost of labor.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet to the detection method that webpage in browser loads of the embodiment of the present invention;
Fig. 2 is that the another kind of the embodiment of the present invention is to the schematic flow sheet of the detection method that webpage in browser loads;
Fig. 3 is that the another kind of the embodiment of the present invention is to the schematic flow sheet of the detection method that webpage in browser loads;
Fig. 4 is a kind of structural representation to the pick-up unit that webpage in browser loads of the embodiment of the present invention;
Fig. 5 is that the another kind of the embodiment of the present invention is to the structural representation of the pick-up unit that webpage in browser loads;
Fig. 6 is a kind of structural representation of the detection module in Fig. 5;
Fig. 7 is the structural representation of a kind of mobile terminal of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment of the present invention Development of Web Browser and test subscriber or domestic consumer can perform the browse operation of corresponding network address to browser, the record initial time when network connecting request initiated by browser, then in the loading procedure of the Webpage of browser, according to can the screen height of display page content in the height of webpage main body and local terminal screen, determine the termination time loaded, the detection that webpage in browser is loaded can be completed thus, so that Development of Web Browser and test subscriber realize the analysis and assessment to browser performance, or using according to domestic consumer the initial time and termination time that report in browser process, analyzing and processing is carried out to related data, obtain the performance index of browser.
Specifically refer to Fig. 1, it is a kind of schematic flow sheet to the detection method that webpage in browser loads of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable in the intelligent mobile terminal of the band network functions such as smart mobile phone, panel computer, intelligent wearable device, can certainly be applied in as required in the conventional terminal such as PC, notebook computer equipment.Concrete, the described method of the embodiment of the present invention comprises:
S101: when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value.
Concrete, user can input the network address of certain website by click browser address field, then navigation confirming button is clicked, terminal receives logic redirect corresponding to the operational orders such as user's click slip on a terminal screen, convergent-divergent click, and the events such as relevant page connect Please summation network loading are passed in the core engine of described browser, human configuration network address can certainly initiate network connecting request to be automatically loaded in browser address bar.Above-mentioned event can be thrown network load-on module and initiate network HTTP request by the core engine of browser, obtains the content such as page primary resource data and page child resource data.And receive these contents and carry out follow-up process.Be page primary resource in the resource of current network connection request, and be that network connecting request initiates the moment, according to the system time of present terminal, storing initial time value T1 can be recorded.Only can certainly initiate the moment in network connecting request and record storing initial time value.
Described page primary resource data refer to the one section of key HTML(HyperText Markup Language presenting Webpage general frame, HTML (Hypertext Markup Language)) text, page child resource is then representative shows the alternative document of the relevant secondary page such as CSS (cascading style sheet) CSS, picture, script realization and special-effect summation with Webpage.Network connecting request initiates the moment, from the angle of Project Realization, can be the network library specific implementation comprising different platform (windows/linux/mac), is exactly the moment that request call function corresponding to page network address is performed specifically.
S102: receive described website and respond the web page resources data that described network connecting request returns, and detect the height value to webpage main body in the web page loading process of described web page resources data.
Terminal constantly receives primary resource data and the child resource data of the corresponding webpage obtained from network, and these network datas received are resolved according to html web page text specification, the page structure that final acquisition can identify and process, simultaneously according to layout and the structure of the definition of HTML/CSS specification, calculate the length and width of page all elements and position etc. to comprise complexity and play up relevant data and be saved in internal memory, provide data basis for data are finally shown on terminal screen.
The height value of webpage main body can be determined by the rectangle frame height value represented by the page main body body label of Webpage primary resource.Due in the process of page loading and parsing, the rectangle frame height represented by page main body body label of Webpage primary resource, can increase gradually along with the element of Webpage own and the continuous resolving of label, in described S102, detection computations can be carried out to the rectangle frame height represented by page main body body label in real time, thus obtain the height value of webpage main body in the web page loading process to described web page resources data in real time.
After obtaining webpage body height value each time, the height value comparing this webpage main body obtained and the screen configured can show height value, if the height value of this webpage main body is less than screen can show height value, then continue to perform this step, obtain new webpage body height value, if the height value of described webpage main body is not less than the screen configured can show height, then perform following S103.
S103: if the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and record described initial time value and described termination time value.
Equally can determine the height value of webpage main body be not less than the screen configured can show height value time, determine termination time value according to the current time of terminal system.This initial time value obtained in S101 and the termination time value that obtains in S103 first can be stored as testing result in described S103, called the testing result of checking that this browsing device net page loads by Development of Web Browser and test subscriber so that follow-up, and evaluate the performance etc. of browser according to this testing result.
After described S103, terminal also can the initial time value of record and termination time value, browser mark together with this terminal sends to connected back-stage management equipment, Development of Web Browser and test subscriber is shown to carry out the performance that related browser identifies indicated browser by back-stage management equipment, or be directly worth according to initial time value and termination time by back-stage management equipment, carry out statistics and the process of related data, excavate potential rule and information, determine the performance of the indicated browser of related browser mark, and the website corresponding to some network address is optimized.
The embodiment of the present invention initiates the initial time of network connecting request by record, and highly determine that browser completes the termination time of webpage loading by the height of page main body and the corresponding display of terminal screen, automatically the acquisition of first screen time, is achieved quickly, improve acquisition of first screen time efficiency, meet the robotization that Development of Web Browser and test subscriber test browser performance etc., intelligent demand, and save cost of labor.
Refer to Fig. 2 again, that the another kind of the embodiment of the present invention is to the schematic flow sheet of the detection method that webpage in browser loads, the described method of the embodiment of the present invention can be applicable in the intelligent mobile terminal of the band network functions such as smart mobile phone, panel computer, intelligent wearable device, can certainly be applied in as required in the conventional terminal such as PC, notebook computer equipment.Concrete, the described method of the embodiment of the present invention comprises:
S201: when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value.
In embodiments of the present invention, can judge whether to have initiated network connecting request according to the allocating time of the page request function to browser.Before described S201, specifically can also comprise: detect in browser and whether there is request function call event, described request function call event comprises: according to the page address inputted in browser address bar, and that calls the page request function of browser calls event; If exist, then judge whether the event of calling of this page request function is that page primary resource calls event; If page primary resource calls event, then determine to detect in browser and initiate network connecting request to website; Wherein, described page primary resource calls event and comprises: invoking page request function initiates the network connecting request of the page primary resource of website indicated by the page address to described input.
S202: receive described website and respond the web data that described network connecting request returns, described web data comprises primary resource data and child resource data.
Described page primary resource data refer to the one section of key HTML(HyperText Markup Language presenting Webpage general frame, HTML (Hypertext Markup Language)) text, page child resource is then representative shows the alternative document of the relevant secondary page such as CSS (cascading style sheet) CSS, picture, script realization and special-effect summation with Webpage.In the embodiment of the present invention, initial time value and termination time value can be determined according to the loading of webpage primary resource, determine the performance of browser Web page loading.
S203: in the loading procedure to described primary resource data, detects the height value of the rectangle frame indicated by webpage principals tab defined in described primary resource data.
S204: using the height value of rectangle frame that the detects height value as webpage main body in the web page loading process of described web page resources data.
In embodiments of the present invention, the height of webpage main body can be determined by the rectangle frame height value represented by the page main body body label of Webpage primary resource.After obtaining this webpage body height value, the height value comparing this webpage main body obtained and the screen configured can show height value, if the height value of this webpage main body is less than screen can show height value, then continue to perform S203 to S204, obtain new webpage body height value, if the height value of described webpage main body is not less than the screen configured can show height, then perform following S205.
S205: if the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and record described initial time value and described termination time value.
The described screen configured can show height value and comprise: the height value being obtained human configuration by human-computer interaction interface; Namely by providing the man-machine interaction UI mode at interface, a height value is directly inputted by user.Or comprise: the height value that the height value based on the pixel value determination terminal screen height value of terminal screen and the function toolbar of browser calculates, namely in browser except the window comprising display web page, also comprise some toolbars, such as menu bar, address field, collection hurdle etc., in practical experience, screen height value is deducted the height of each function toolbar, height value and the screen described in the embodiment of the present invention that can obtain the window of display web page content can show height value.
S206: the initial time value and the termination time value that store described record, and when receiving performance and checking request, shows described initial time value and termination time value to determine the performance rate of described browser.
Specifically can arrange the mapping relations of duration and performance rate, from initial time value to termination time, the duration of value is longer, then performance rate is lower, shorter, then illustrate that the performance of browser is higher.
The embodiment of the present invention initiates the initial time of network connecting request by record, and the height of the rectangle frame indicated by page principals tab determines the termination time that browser completes webpage and loads, automatically the acquisition of first screen time, is achieved quickly, improve acquisition of first screen time efficiency, meet the robotization that Development of Web Browser and test subscriber test browser performance etc., intelligent demand, and save cost of labor.
Refer to Fig. 3 again, that the another kind of the embodiment of the present invention is to the schematic flow sheet of the detection method that webpage in browser loads, the described method of the embodiment of the present invention can be applicable in the intelligent mobile terminal of the band network functions such as smart mobile phone, panel computer, intelligent wearable device, can certainly be applied in as required in the conventional terminal such as PC, notebook computer equipment.Concrete, the described method of the embodiment of the present invention comprises:
S301: when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value.
In embodiments of the present invention, can judge whether to have initiated network connecting request according to the allocating time of the page request function to browser.Before described S301, specifically can also comprise: detect in browser the page address whether existed according to inputting in browser address bar, that calls the page request function of browser calls event; If exist, then whether the event of calling detecting this page request function is that page primary resource calls event; If page primary resource calls event, then determine to detect in browser and initiate network connecting request to website; Wherein, described page primary resource calls event and comprises: invoking page request function initiates the network connecting request of the page primary resource of website indicated by the page address to described input.
S302: receive described website and respond the web data that described network connecting request returns, described web data comprises primary resource data and child resource data.
Described page primary resource data refer to the one section of key HTML(HyperText Markup Language presenting Webpage general frame, HTML (Hypertext Markup Language)) text, page child resource is then representative shows the alternative document of the relevant secondary page such as CSS (cascading style sheet) CSS, picture, script realization and special-effect summation with Webpage.In the embodiment of the present invention, initial time value and termination time value can be determined according to the loading of webpage primary resource, determine the performance of browser Web page loading.
S303: in the loading procedure to described primary resource data, detects the height value of the rectangle frame indicated by webpage principals tab defined in described primary resource data.
S304: using the height value of rectangle frame that the detects height value as webpage main body in the web page loading process of described web page resources data.
In embodiments of the present invention, the height of webpage main body can be determined by the rectangle frame height value represented by the page main body body label of Webpage primary resource.After obtaining this webpage body height value, the height value comparing this webpage main body obtained and the screen configured can show height value, if the height value of this webpage main body is less than screen can show height value, then continue to perform S303 to S304, obtain new webpage body height value, if the height value of described webpage main body is not less than the screen configured can show height, then perform following S305.
S305: if the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and record described initial time value and described termination time value.
The described screen configured can show height value and comprise: the height value being obtained human configuration by human-computer interaction interface; Namely by providing the man-machine interaction UI mode at interface, a height value is directly inputted by user.Or comprise: the height value that the height value based on the pixel value determination terminal screen height value of terminal screen and the function toolbar of browser calculates, namely in browser except the window comprising display web page, also comprise some toolbars, such as menu bar, address field, collection hurdle etc., in practical experience, screen height value is deducted the height of each function toolbar, height value and the screen described in the embodiment of the present invention that can obtain the window of display web page content can show height value.
S306: the duration parameters determining browser Web page loading described in this according to described initial time value and described termination time value.
S307: according to the mapping relations of duration parameters and preset duration and performance rate, determine the performance rate of described browser.
Specifically can deduct initial time value by termination time value and can obtain duration parameters.From initial time value to termination time, the duration of value is longer, then performance rate is lower, shorter, then illustrate that the performance of browser is higher.
The embodiment of the present invention initiates the initial time of network connecting request by record, and highly determine that browser completes the termination time of webpage loading by the height of page main body and the corresponding display of terminal screen, automatically the acquisition of first screen time, is achieved quickly, improve acquisition of first screen time efficiency, meet the robotization that Development of Web Browser and test subscriber test browser performance etc., intelligent demand, and save cost of labor.
The pick-up unit that webpage in browser loads is described in detail below to the embodiment of the present invention.
Refer to Fig. 4, it is a kind of structural representation to the pick-up unit that webpage in browser loads of the embodiment of the present invention, the described device of the embodiment of the present invention can arrange and be, in the intelligent mobile terminal of the band such as smart mobile phone, panel computer, intelligent wearable device network function, can certainly be applied in as required in the conventional terminal such as PC, notebook computer equipment.Concrete, described device comprises:
Determination module 1, for when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value;
Detection module 2, responds for receiving described website the web page resources data that described network connecting request returns, and detects the height value to webpage main body in the web page loading process of described web page resources data;
Logging modle 3, if be not less than for the height value of described webpage main body the screen configured can show height value, be defined as termination time value, and record described initial time value and described termination time value by current time.
User can input the network address of certain website by click browser address field, then navigation confirming button is clicked, terminal receives logic redirect corresponding to the operational orders such as user's click slip on a terminal screen, convergent-divergent click, and the events such as relevant page connect Please summation network loading is passed in the core engine of described browser.Above-mentioned event can be thrown network load-on module and initiate network HTTP request by the core engine of browser, obtains the content such as page primary resource data and page child resource data.And receive these contents and carry out follow-up process.Described determination module 1 is page primary resource in the resource of current network connection request, and is the network connecting request initiation moment, according to the system time of present terminal, can record storing initial time value T1.Certainly, described determination module 1 also only can be initiated the moment in network connecting request and be recorded storing initial time value.
Described page primary resource data refer to the one section of key HTML(HyperText Markup Language presenting Webpage general frame, HTML (Hypertext Markup Language)) text, page child resource is then representative shows the alternative document of the relevant secondary page such as CSS (cascading style sheet) CSS, picture, script realization and special-effect summation with Webpage.Network connecting request in described determination module 1 initiates the moment, from the angle of Project Realization, can be the network library specific implementation comprising different platform (windows/linux/mac), be exactly the moment that request call function corresponding to page network address is performed specifically.
Terminal constantly receives primary resource data and the child resource data of the corresponding webpage obtained from network, and these network datas received are resolved according to html web page text specification, the page structure that final acquisition can identify and process, simultaneously according to layout and the structure of the definition of HTML/CSS specification, calculate the length and width of page all elements and position etc. to comprise complexity and play up relevant data and be saved in internal memory, provide data basis for data are finally shown on terminal screen.
The height value of the webpage main body that described detection module 2 detects can be determined by the rectangle frame height value represented by the page main body body label of Webpage primary resource.Due in the process of page loading and parsing, the rectangle frame height represented by page main body body label of Webpage primary resource, can increase gradually along with the element of Webpage own and the continuous resolving of label, described detection module 2 can carry out detection computations to the rectangle frame height represented by page main body body label in real time, thus obtains the height value of webpage main body in the web page loading process to described web page resources data in real time.
After described detection module 2 obtains webpage body height value each time, the height value that can be used for further comparing the webpage main body that this obtains and the screen configured can show height value, if the height value of the webpage main body that detection module 2 described in this detects is less than screen and can shows height value, then continue to obtain new webpage body height value, if the height value of described webpage main body is not less than the screen configured can show height, then notify described logging modle 3.
Described logging modle 3 can determine the height value of webpage main body be not less than the screen configured can show height value time, determine termination time value according to the current time of terminal system.The termination time value that described logging modle 3 obtains when first can store the initial time value and described detection module 2 initiation notice that obtain in determination module 1 described in this is as testing result, called the testing result of checking that this browsing device net page loads by Development of Web Browser and test subscriber so that follow-up, and evaluate the performance etc. of browser according to this testing result.
Further, after obtaining initial time value that browser opens page primary resource and termination time value, terminal also can the initial time value of record and termination time value, browser mark together with this terminal sends to connected back-stage management equipment, Development of Web Browser and test subscriber is shown to carry out the performance that related browser identifies indicated browser by back-stage management equipment, or be directly worth according to initial time value and termination time by back-stage management equipment, carry out statistics and the process of related data, excavate potential rule and information, determine the performance of the indicated browser of related browser mark, and the website corresponding to some network address is optimized.
The embodiment of the present invention initiates the initial time of network connecting request by record, and highly determine that browser completes the termination time of webpage loading by the height of page main body and the corresponding display of terminal screen, automatically the acquisition of first screen time, is achieved quickly, improve acquisition of first screen time efficiency, meet the robotization that Development of Web Browser and test subscriber test browser performance etc., intelligent demand, and save cost of labor.
Refer to Fig. 5 again, that the another kind of the embodiment of the present invention is to the structural representation of the pick-up unit that webpage in browser loads, the described device of the embodiment of the present invention comprises determination module 1, detection module 2 and logging modle 3 in above-described embodiment, in embodiments of the present invention, described device can also comprise:
Call detection module 4, whether there is request function call event for detecting in browser, described request function call event comprises: according to the page address inputted in browser address bar, and that calls the page request function of browser calls event;
Judge module 5, for when the described testing result calling detection module is for existing, then judges whether the event of calling of this page request function is that page primary resource calls event; If page primary resource calls event, then determine to detect in browser and initiate network connecting request to website;
Wherein, described page primary resource calls event and comprises: invoking page request function initiates the network connecting request of the page primary resource of website indicated by the page address to described input.
Further alternatively, as shown in Figure 6, described detection module 2 specifically can comprise:
Receiving element 21, respond for receiving described website the web data that described network connecting request returns, described web data comprises primary resource data and child resource data;
Detecting unit 22, in the loading procedure to described primary resource data, detects the height value of the rectangle frame indicated by webpage principals tab defined in described primary resource data;
Determining unit 23, for the height value of rectangle frame that will the detect height value as webpage main body in the web page loading process of described web page resources data.
Further, the described device of the embodiment of the present invention can also comprise:
Configuration module 6, can show height value for configuring described screen, the described screen configured can show height value and comprise: the height value being obtained human configuration by human-computer interaction interface; Or comprise: the height value that the height value based on the pixel value determination terminal screen height value of terminal screen and the function toolbar of browser calculates.
Described configuration module 6 can obtain the height value of human configuration by human-computer interaction interface; Namely by providing the man-machine interaction UI mode at interface, a height value is directly inputted by Development of Web Browser and test subscriber.The height value that described configuration module 6 also can calculate based on the height value of the function toolbar of the pixel value determination terminal screen height value of terminal screen and browser, namely in browser except the window comprising display web page, also comprise some toolbars, such as menu bar, address field, collection hurdle etc., in practical experience, screen height value is deducted the height of each function toolbar, height value and the screen described in the embodiment of the present invention that can obtain the window of display web page content can show height value.
Further, the described device of the embodiment of the present invention can also comprise:
Memory module 7, for storing initial time value and the termination time value of described record, and when receiving performance and checking request, shows described initial time value and termination time value to determine the performance rate of described browser.Specifically can arrange the mapping relations of duration and performance rate, from initial time value to termination time, the duration of value is longer, then performance rate is lower, shorter, then illustrate that the performance of browser is higher.
Further, the described device of the embodiment of the present invention can also comprise:
Performance determination module 8, for determining the duration parameters of browser Web page loading described in this according to described initial time value and described termination time value; According to the mapping relations of duration parameters and preset duration and performance rate, determine the performance rate of described browser.Specifically can deduct initial time value by termination time value and can obtain duration parameters.From initial time value to termination time, the duration of value is longer, then performance rate is lower, shorter, then illustrate that the performance of browser is higher.
Refer to Fig. 7 further, be the structural representation of a kind of mobile terminal of the embodiment of the present invention, described mobile terminal comprises: at least one processor 1001, such as CPU, at least one communication bus 1002, at least one network interface 1003, storer 1004.Wherein, communication bus 1002 is for realizing the connection communication between these assemblies.Wherein, described network interface 1003 optionally can comprise wireline interface, the wave point (as WI-FI, mobile communication interface etc.) of standard.Described storer 1004 can be high-speed RAM storer, also can be non-labile storer (non-volatile memory), as at least one magnetic disk memory.Described storer 1004 can also be optionally that at least one is positioned at the memory storage away from aforementioned processor 1001.As shown in Figure 7, store operating system, network communication module as in a kind of storer 1004 of computer-readable storage medium, and the detection application program stored webpage loading in browser and other programs.
Concrete, described processor 1001 may be used for calling the detection application program loaded webpage in browser stored in described storer 1004, performs following steps:
When detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value;
Receive described website and respond the web page resources data that described network connecting request returns, and detect the height value to webpage main body in the web page loading process of described web page resources data;
If the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and records described initial time value and described termination time value.
Further alternatively, described processor 1001 also performs following steps:
Detect in browser and whether there is request function call event, described request function call event comprises: according to the page address inputted in browser address bar, and that calls the page request function of browser calls event;
If exist, then judge whether the event of calling of this page request function is that page primary resource calls event;
If page primary resource calls event, then determine to detect in browser and initiate network connecting request to website;
Wherein, described page primary resource calls event and comprises: invoking page request function initiates the network connecting request of the page primary resource of website indicated by the page address to described input.
Further alternatively, described processor 1001 responds the web page resources data that described network connecting request returns performing described reception described website, and the height value detected webpage main body in the web page loading process of described web page resources data, specifically perform following steps:
Receive described website and respond the web data that described network connecting request returns, described web data comprises primary resource data and child resource data;
In the loading procedure to described primary resource data, detect the height value of the rectangle frame indicated by webpage principals tab defined in described primary resource data;
Using the height value of rectangle frame that the detects height value as webpage main body in the web page loading process of described web page resources data.
Further alternatively, described processor 1001 also performs following steps:
Store initial time value and the termination time value of described record, and when receiving performance and checking request, show described initial time value and termination time value to determine the performance rate of described browser.
Further alternatively, described processor 1001 also performs following steps:
The duration parameters of browser Web page loading described in this is determined according to described initial time value and described termination time value;
According to the mapping relations of duration parameters and preset duration and performance rate, determine the performance rate of described browser.
The embodiment of the present invention initiates the initial time of network connecting request by record, and highly determine that browser completes the termination time of webpage loading by the height of page main body and the corresponding display of terminal screen, automatically the acquisition of first screen time, is achieved quickly, improve acquisition of first screen time efficiency, meet the robotization that Development of Web Browser and test subscriber test browser performance etc., intelligent demand, and save cost of labor.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (10)

1., to the detection method that webpage in browser loads, it is characterized in that, comprising:
When detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value;
Receive described website and respond the web page resources data that described network connecting request returns, and detect the height value to webpage main body in the web page loading process of described web page resources data;
If the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and records described initial time value and described termination time value.
2. the method for claim 1, is characterized in that, described when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time interocclusal record obtain initial time value before, also comprise:
Detect in browser and whether there is request function call event, described request function call event comprises: according to the page address inputted in browser address bar, and that calls the page request function of browser calls event;
If exist, then judge whether the event of calling of this page request function is that page primary resource calls event;
If page primary resource calls event, then determine to detect in browser and initiate network connecting request to website;
Wherein, described page primary resource calls event and comprises: invoking page request function initiates the network connecting request of the page primary resource of website indicated by the page address to described input.
3. method as claimed in claim 2, it is characterized in that, the described website of described reception responds the web page resources data that described network connecting request returns, and detects the height value to webpage main body in the web page loading process of described web page resources data, comprising:
Receive described website and respond the web data that described network connecting request returns, described web data comprises primary resource data and child resource data;
In the loading procedure to described primary resource data, detect the height value of the rectangle frame indicated by webpage principals tab defined in described primary resource data;
Using the height value of rectangle frame that the detects height value as webpage main body in the web page loading process of described web page resources data.
4. the method as described in any one of claims 1 to 3, is characterized in that, the described screen configured can show height value and comprise: the height value being obtained human configuration by human-computer interaction interface; Or comprise: the height value that the height value based on the pixel value determination terminal screen height value of terminal screen and the function toolbar of browser calculates.
5. method as claimed in claim 4, is characterized in that, also comprise:
Store initial time value and the termination time value of described record, and when receiving performance and checking request, show described initial time value and termination time value to determine the performance rate of described browser.
6. method as claimed in claim 4, is characterized in that, also comprise:
The duration parameters of browser Web page loading described in this is determined according to described initial time value and described termination time value;
According to the mapping relations of duration parameters and preset duration and performance rate, determine the performance rate of described browser.
7., to the pick-up unit that webpage in browser loads, it is characterized in that, comprising:
Determination module, for when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value;
Detection module, responds for receiving described website the web page resources data that described network connecting request returns, and detects the height value to webpage main body in the web page loading process of described web page resources data;
Logging modle, if be not less than for the height value of described webpage main body the screen configured can show height value, be defined as termination time value, and record described initial time value and described termination time value by current time.
8. device as claimed in claim 7, is characterized in that, also comprise:
Call detection module, whether there is request function call event for detecting in browser, described request function call event comprises: according to the page address inputted in browser address bar, and that calls the page request function of browser calls event;
Judge module, for when the described testing result calling detection module is for existing, then judges whether the event of calling of this page request function is that page primary resource calls event; If page primary resource calls event, then determine to detect in browser and initiate network connecting request to website;
Wherein, described page primary resource calls event and comprises: invoking page request function initiates the network connecting request of the page primary resource of website indicated by the page address to described input.
9. device as claimed in claim 8, it is characterized in that, described detection module comprises:
Receiving element, respond for receiving described website the web data that described network connecting request returns, described web data comprises primary resource data and child resource data;
Detecting unit, in the loading procedure to described primary resource data, detects the height value of the rectangle frame indicated by webpage principals tab defined in described primary resource data;
Determining unit, for the height value of rectangle frame that will the detect height value as webpage main body in the web page loading process of described web page resources data.
10. a mobile terminal, is characterized in that, comprises communicator and processor,
Described communicator, for website communication;
Described processor, for when detect in browser to website initiate network connecting request time, according to initiate network connecting request time time be defined as initial time value; Receive described website and respond the web page resources data that described network connecting request returns, and detect the height value to webpage main body in the web page loading process of described web page resources data; If the height value of described webpage main body is not less than the screen configured can show height value, current time is defined as termination time value, and records described initial time value and described termination time value.
CN201410077457.2A 2014-03-04 2014-03-04 Detection method, device and the mobile terminal that webpage loads in a kind of pair of browser Active CN104899131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410077457.2A CN104899131B (en) 2014-03-04 2014-03-04 Detection method, device and the mobile terminal that webpage loads in a kind of pair of browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410077457.2A CN104899131B (en) 2014-03-04 2014-03-04 Detection method, device and the mobile terminal that webpage loads in a kind of pair of browser

Publications (2)

Publication Number Publication Date
CN104899131A true CN104899131A (en) 2015-09-09
CN104899131B CN104899131B (en) 2019-04-26

Family

ID=54031807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410077457.2A Active CN104899131B (en) 2014-03-04 2014-03-04 Detection method, device and the mobile terminal that webpage loads in a kind of pair of browser

Country Status (1)

Country Link
CN (1) CN104899131B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106612198A (en) * 2015-10-26 2017-05-03 中国移动通信集团公司 Quality-of-service test index test method and quality-of-service test index test device
CN106656666A (en) * 2016-12-13 2017-05-10 中国联合网络通信集团有限公司 Method and device for acquiring first screen time of web page
CN107766224A (en) * 2017-11-07 2018-03-06 百度在线网络技术(北京)有限公司 Method of testing and test device
CN108205487A (en) * 2016-12-20 2018-06-26 广州市动景计算机科技有限公司 A kind of method, apparatus and user terminal for monitoring browser performance
CN108984384A (en) * 2017-06-01 2018-12-11 中国电信股份有限公司 Webpage head screen time-delay measuring method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760133A (en) * 2011-04-28 2012-10-31 腾讯科技(深圳)有限公司 Webpage loading method, webpage loading system, browser, terminal and server
CN103116708A (en) * 2013-03-05 2013-05-22 星云融创(北京)信息技术有限公司 Device and method for evaluating website experience
CN103324521A (en) * 2013-06-20 2013-09-25 张家港保税区润桐电子技术研发有限公司 Method for measuring initial screen time of webpage
CN103581987A (en) * 2012-07-31 2014-02-12 腾讯科技(深圳)有限公司 Method and device for testing webpage downloading speed of mobile terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760133A (en) * 2011-04-28 2012-10-31 腾讯科技(深圳)有限公司 Webpage loading method, webpage loading system, browser, terminal and server
CN103581987A (en) * 2012-07-31 2014-02-12 腾讯科技(深圳)有限公司 Method and device for testing webpage downloading speed of mobile terminal device
CN103116708A (en) * 2013-03-05 2013-05-22 星云融创(北京)信息技术有限公司 Device and method for evaluating website experience
CN103324521A (en) * 2013-06-20 2013-09-25 张家港保税区润桐电子技术研发有限公司 Method for measuring initial screen time of webpage

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106612198A (en) * 2015-10-26 2017-05-03 中国移动通信集团公司 Quality-of-service test index test method and quality-of-service test index test device
CN106612198B (en) * 2015-10-26 2019-08-13 中国移动通信集团公司 A kind of test method and device of measure of the quality of service index
CN106656666A (en) * 2016-12-13 2017-05-10 中国联合网络通信集团有限公司 Method and device for acquiring first screen time of web page
CN106656666B (en) * 2016-12-13 2020-05-22 中国联合网络通信集团有限公司 Method and device for acquiring first screen time of webpage
CN108205487A (en) * 2016-12-20 2018-06-26 广州市动景计算机科技有限公司 A kind of method, apparatus and user terminal for monitoring browser performance
CN108984384A (en) * 2017-06-01 2018-12-11 中国电信股份有限公司 Webpage head screen time-delay measuring method, device and system
CN107766224A (en) * 2017-11-07 2018-03-06 百度在线网络技术(北京)有限公司 Method of testing and test device
CN107766224B (en) * 2017-11-07 2020-12-08 百度在线网络技术(北京)有限公司 Test method and test device

Also Published As

Publication number Publication date
CN104899131B (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN106503134B (en) Browser jumps to the method for data synchronization and device of application program
CN107783899B (en) Method and device for testing H5 page in application program and computer equipment
CN104899131A (en) Detection method and device of webpage loading in browser, and mobile terminal
CN104899269A (en) Website link accessing method and apparatus
CN103714115A (en) Method and device for loading web page content
US11019160B2 (en) Segment generation describing usage patterns
CN105607986A (en) Acquisition method and device of user behavior log data
CN104899220A (en) Application program recommendation method and system
CN106528659A (en) A control method and device for jumping from a browser to an application program
CN103678343B (en) The method and apparatus of prompting webpage load progress
CN106339380A (en) Method and device for recommending frequently asked question information
CN104899016A (en) Call stack relationship obtaining method and call stack relationship obtaining device
WO2020199749A1 (en) Feedback-based information pushing method and apparatus, and electronic device
CN103365877A (en) Method and server for making directory after webpage is transcoded
CN111427657A (en) Application window display method and device
CN110046310B (en) Method and device for analyzing jump link in page
WO2017206476A1 (en) Method, device and apparatus for detecting cpu occupation
CN104834589A (en) Webpage detection method and device
CN104753979A (en) Method, server, terminal and system for displaying website information
US20130339354A1 (en) Method and system for mining trends around trending terms
CN107133165B (en) Browser compatibility detection method and device
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN113032073A (en) Page display method and device based on operation behaviors
CN110708270B (en) Abnormal link detection method and device
CN111813641A (en) Method, device, medium and equipment for collecting crash information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221117

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133

Patentee after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.