CN105515894B - A kind of test method and test device that can judgement surf the Internet - Google Patents

A kind of test method and test device that can judgement surf the Internet Download PDF

Info

Publication number
CN105515894B
CN105515894B CN201510847601.0A CN201510847601A CN105515894B CN 105515894 B CN105515894 B CN 105515894B CN 201510847601 A CN201510847601 A CN 201510847601A CN 105515894 B CN105515894 B CN 105515894B
Authority
CN
China
Prior art keywords
internet
surf
particular picture
judging
current network
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.)
Active
Application number
CN201510847601.0A
Other languages
Chinese (zh)
Other versions
CN105515894A (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510847601.0A priority Critical patent/CN105515894B/en
Publication of CN105515894A publication Critical patent/CN105515894A/en
Application granted granted Critical
Publication of CN105515894B publication Critical patent/CN105515894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The invention discloses the test methods that can a kind of judgement surf the Internet, comprising: the particular picture of server is accessed by JavaScript;When receiving when returning the result of particular picture described in successful access, then judge that current network can surf the Internet.The present invention accesses the particular picture above server by JavaScript, and constantly go to send access request, particular picture can be found and be judged as and can surf the Internet, be otherwise exactly that cannot surf the Internet, and set the time interval requested every time and total degree, facilitate whole control, directly judges whether to surf the Internet by JavaScript, do not need to go to handle by cgi, judged by front-end code, judgment accuracy is higher, judges that the time faster, facilitates modification and maintenance.

Description

A kind of test method and test device that can judgement surf the Internet
Technical field
The present invention relates to network test field, the test method that can be surfed the Internet more particularly to a kind of judgement and test dress It sets.
Background technique
All be mostly in the prior art inside the cgi (Common Gateway Interface, CGI(Common gateway interface)) into Row judgement can surf the Internet, and then in the value for returning to page response, the page goes to judge in the value returned by cgi, Jin Erxian Show corresponding page effect, this interaction needs to take some time, and needs bottom and front end during debugging It goes cooperation to debug, while having many limitations, such as the speed read, the problems such as the accuracy of judgement, and need page The interaction process in face and cgi, it is fairly cumbersome, especially for developer, if be not all very familiar with to bottom and front end Words are encountered problem and are difficult to where orientation problem promptly and accurately.
Summary of the invention
Can the object of the present invention is to provide one kind not to need cgi processing, directly judge surf the Internet by JavaScript Test method and test device, accurate quick.
Technical solution provided by the invention is as follows:
The present invention discloses a kind of test method that can judgement surf the Internet, and services comprising steps of being accessed by JavaScript The particular picture of device;When receiving when returning the result of particular picture described in successful access, then judge that current network can surf the Internet.
The invention also discloses the test methods that can another judgement surf the Internet, comprising steps of being visited by JavaScript Ask the particular picture of server;When receiving when returning the result of particular picture described in successful access, then judge that current network can With online.If when returning the result of the particular picture can not be accessed by receiving, within a preset time according between preset time Access request is initiated to server every lasting.
The invention also discloses the test methods that can another judgement surf the Internet, comprising steps of being visited by JavaScript Ask the particular picture of server;When receiving when returning the result of particular picture described in successful access, then judge that current network can With online.If when returning the result of the particular picture can not be accessed by receiving, within a preset time according between preset time Access request is initiated to server every lasting.The return of particular picture described in successful access is not received in the preset time When as a result, then request timed out, judges that current network be cannot get online.
It is further preferred that the display page is dynamic effect when judging that current network can surf the Internet.
It is further preferred that the display page is static effects when judging that current network be cannot get online.
The invention also discloses the test devices that can a kind of judgement surf the Internet, comprising: access modules pass through JavaScript Access the particular picture of server;Judgment module then judges when receiving when returning the result of particular picture described in successful access Current network can surf the Internet.
The invention also discloses the test devices that can another judgement surf the Internet, comprising: access modules pass through The particular picture of JavaScript access server;Judgment module, when the return knot for receiving particular picture described in successful access When fruit, then judge that current network can surf the Internet.The return knot of the particular picture can not be accessed when the judgment module receives When fruit, the access modules continue to initiate access request to server within a preset time according to prefixed time interval.
The invention also discloses the test devices that can another judgement surf the Internet, comprising: access modules pass through The particular picture of JavaScript access server;Judgment module, when the return knot for receiving particular picture described in successful access When fruit, then judge that current network can surf the Internet.The return knot of the particular picture can not be accessed when the judgment module receives When fruit, the access modules continue to initiate access request to server within a preset time according to prefixed time interval.When described Judgment module does not receive when returning the result of particular picture described in successful access within a preset time, judges that current network cannot Online.
The invention also discloses the test devices that can another judgement surf the Internet, comprising: access modules pass through The particular picture of JavaScript access server;Judgment module, when the return knot for receiving particular picture described in successful access When fruit, then judge that current network can surf the Internet;The return knot of the particular picture can not be accessed when the judgment module receives When fruit, the access modules continue to initiate access request to server within a preset time according to prefixed time interval;When described Judgment module does not receive when returning the result of particular picture described in successful access within a preset time, judges that current network cannot Online;Display module, when judging that current network can surf the Internet, the display page is dynamic effect;And when judging current network When cannot get online, the display page is static effects.
Compared with prior art, the present invention accesses the particular picture above server by JavaScript, and constantly Hair access request is gone, particular picture can be found and be judged as and can surf the Internet, is otherwise exactly that cannot surf the Internet, and set each The time interval and total degree of request, facilitate whole control, directly judge whether to surf the Internet by JavaScript, not need It goes to handle by cgi, be judged by front-end code, judgment accuracy is higher, judges that the time faster, facilitates modification and maintenance.
Detailed description of the invention
Below by clearly understandable mode, preferred embodiment is described with reference to the drawings, can surf the Internet to a kind of judgement Above-mentioned characteristic, technical characteristic, advantage and its implementation of test method and test device are further described.
Fig. 1 is a kind of step schematic diagram for the test method that can judgement surf the Internet of the present invention;
Fig. 2 is a kind of main composition schematic diagram for the test device that can judgement surf the Internet of the present invention;
Fig. 3 is fully composed schematic diagram for a kind of test device that can judgement surf the Internet of the present invention.
Drawing reference numeral explanation:
100. access modules, 200. judgment modules, 300. display modules.
Specific embodiment
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, Detailed description of the invention will be compareed below A specific embodiment of the invention.It should be evident that drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented Its practical structures as product.In addition, there is identical structure or function in some figures so that simplified form is easy to understand Component only symbolically depicts one of those, or has only marked one of those.Herein, "one" is not only indicated " only this ", can also indicate the situation of " more than one ".
Fig. 1 is a kind of step schematic diagram for the test method that can judgement surf the Internet of the present invention, as a tool of the invention Body embodiment, as shown in Figure 1, the test method that can a kind of judgement surf the Internet, services comprising steps of being accessed by JavaScript The particular picture of device;When receiving when returning the result of particular picture described in successful access, then judge that current network can surf the Internet.
Specifically, must be fixed in the present invention by the name and path of the particular picture of JavaScript access, it can not With change.
Above-described embodiment is improved, the test method that can another judgement surf the Internet is obtained, comprising steps of passing through The particular picture of JavaScript access server;When receiving when returning the result of particular picture described in successful access, then sentence Disconnected current network can surf the Internet.If when returning the result of the particular picture can not be accessed by receiving, press within a preset time Continue to initiate access request to server according to prefixed time interval.
Specifically, the number and prefixed time interval of access request oneself can be set in the present invention, it is easy to use not With on the page.
Above-described embodiment is improved, the test method that can another judgement surf the Internet is obtained, comprising steps of passing through The particular picture of JavaScript access server;When receiving when returning the result of particular picture described in successful access, then sentence Disconnected current network can surf the Internet.If when returning the result of the particular picture can not be accessed by receiving, press within a preset time Continue to initiate access request to server according to prefixed time interval.Spy described in successful access is not received in the preset time Determine when returning the result of picture, then request timed out, judges that current network be cannot get online.
The present invention mainly calls a function before this, this function can go the particular picture above access server, so Afterwards if particular picture can be accessed, it is returned to returning the result for particular picture described in success i.e. successful access, cannot be accessed Particular picture, returning the result for the particular picture can not be accessed by being returned to error, never be accessed within a preset time Timeout request timed out result is returned to particular picture.It then respectively can be just to the page according to the Different Results of return Corresponding processing.
Preferably, when judging that current network can surf the Internet, the display page is dynamic effect.
Preferably, when judging that current network be cannot get online, the display page is static effects.
The present invention shows corresponding effect in the page according to judging result, easily and intuitively allow user know whether can more than Net.
Fig. 2 is a kind of main composition schematic diagram for the test device that can judgement surf the Internet of the present invention, as of the invention one A specific embodiment, as shown in Figure 2, comprising: access modules 100 access the particular picture of server by JavaScript;Sentence Disconnected module 200 then judges that current network can surf the Internet when receiving when returning the result of particular picture described in successful access.
Above-described embodiment is improved, obtains the test device that can another judgement surf the Internet, comprising: access modules 100, the particular picture of server is accessed by JavaScript;Judgment module 200, when receiving specific pattern described in successful access When returning the result of piece then judges that current network can surf the Internet.When the judgment module 200 receive can not access it is described specific When returning the result of picture, the access modules 100 continue to initiate to server according to prefixed time interval within a preset time Access request.
Above-described embodiment is improved, obtains the test device that can another judgement surf the Internet, comprising: access modules 100, the particular picture of server is accessed by JavaScript;Judgment module 200, when receiving specific pattern described in successful access When returning the result of piece then judges that current network can surf the Internet.When the judgment module 200 receive can not access it is described specific When returning the result of picture, the access modules 100 continue to initiate to server according to prefixed time interval within a preset time Access request.When the judgment module 200 does not receive returning the result for particular picture described in successful access within a preset time When, judge that current network be cannot get online.
Above-described embodiment is improved, the test device that can another judgement surf the Internet is obtained, Fig. 3 is that the present invention is a kind of Can judge the test device that surf the Internet be fully composed schematic diagram, as shown in Figure 3, comprising: access modules 100 pass through The particular picture of JavaScript access server;Judgment module 200, when the return for receiving particular picture described in successful access When as a result, then judge that current network can surf the Internet;Returning for the particular picture can not be accessed when the judgment module 200 receives When returning result, the access modules 100 continue to initiate access request to server within a preset time according to prefixed time interval; When the judgment module 200 does not receive when returning the result of particular picture described in successful access within a preset time, judgement is worked as Preceding network be cannot get online;Display module 300, when judging that current network can surf the Internet, the display page is dynamic effect;And When judging that current network be cannot get online, the display page is static effects.
It should be noted that above-described embodiment can be freely combined as needed.The above is only of the invention preferred Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention Under, several improvements and modifications can also be made, these modifications and embellishments should also be considered as the scope of protection of the present invention.

Claims (9)

1. the test method that can a kind of judgement surf the Internet, which is characterized in that comprising steps of
The particular picture of server is accessed by JavaScript, the name of the particular picture and path are fixed;
When receiving when returning the result of particular picture described in successful access, then judge that current network can surf the Internet.
2. the method for judging to surf the Internet as described in claim 1, which is characterized in that further comprise the steps of:
If when returning the result of the particular picture can not be accessed by receiving, held within a preset time according to prefixed time interval Continue to server and initiates access request.
3. the method for judging to surf the Internet as claimed in claim 2, which is characterized in that further comprise the steps of:
It does not receive when returning the result of particular picture described in successful access in the preset time, then request timed out, judges Current network be cannot get online.
4. the method for judging to surf the Internet as described in claim 1, which is characterized in that further comprise the steps of:
When judging that current network can surf the Internet, the display page is dynamic effect.
5. the method for judging to surf the Internet as claimed in claim 3, which is characterized in that further comprise the steps of:
When judging that current network be cannot get online, the display page is static effects.
6. the test device that can a kind of judgement surf the Internet characterized by comprising
Access modules, the particular picture of server is accessed by JavaScript, and the name of the particular picture and path are solid Fixed;
Judgment module then judges that current network can surf the Internet when receiving when returning the result of particular picture described in successful access.
7. judging the device that can be surfed the Internet as claimed in claim 6, it is characterised in that:
When returning the result of the particular picture can not be accessed when the judgment module receives, the access modules are when default It is interior to continue to initiate access request to server according to prefixed time interval.
8. judging the device that can be surfed the Internet as claimed in claim 7, it is characterised in that:
When the judgment module does not receive when returning the result of particular picture described in successful access within a preset time, judgement is worked as Preceding network be cannot get online.
9. judging the device that can be surfed the Internet as claimed in claim 7, which is characterized in that further include:
Display module, when judging that current network can surf the Internet, the display page is dynamic effect;And when judging current network When cannot get online, the display page is static effects.
CN201510847601.0A 2015-11-27 2015-11-27 A kind of test method and test device that can judgement surf the Internet Active CN105515894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510847601.0A CN105515894B (en) 2015-11-27 2015-11-27 A kind of test method and test device that can judgement surf the Internet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510847601.0A CN105515894B (en) 2015-11-27 2015-11-27 A kind of test method and test device that can judgement surf the Internet

Publications (2)

Publication Number Publication Date
CN105515894A CN105515894A (en) 2016-04-20
CN105515894B true CN105515894B (en) 2019-10-22

Family

ID=55723553

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510847601.0A Active CN105515894B (en) 2015-11-27 2015-11-27 A kind of test method and test device that can judgement surf the Internet

Country Status (1)

Country Link
CN (1) CN105515894B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209004A (en) * 2010-03-30 2011-10-05 中华电信股份有限公司 Network transmission rate testing method
CN103559130A (en) * 2013-11-01 2014-02-05 百度在线网络技术(北京)有限公司 Method and device for testing fluency of browser
CN103645978A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Method, device and system for testing browser webpage loading time
CN104063286A (en) * 2013-03-22 2014-09-24 腾讯科技(深圳)有限公司 Method and device for testing fluency of change of displayed content

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035862B (en) * 2013-03-08 2017-10-27 腾讯科技(深圳)有限公司 Closure method of testing and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209004A (en) * 2010-03-30 2011-10-05 中华电信股份有限公司 Network transmission rate testing method
CN104063286A (en) * 2013-03-22 2014-09-24 腾讯科技(深圳)有限公司 Method and device for testing fluency of change of displayed content
CN103559130A (en) * 2013-11-01 2014-02-05 百度在线网络技术(北京)有限公司 Method and device for testing fluency of browser
CN103645978A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Method, device and system for testing browser webpage loading time

Also Published As

Publication number Publication date
CN105515894A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
CN108721898B (en) Frame rate determination method and apparatus, storage medium, and electronic apparatus
CN105045620B (en) Measure the method and detection device of webpage head screen load time
CN103810097A (en) Evaluation of page load performance of web browser
CN108075934A (en) A kind of network quality monitoring method, apparatus and system
CN103117907A (en) Network speed test method and system and method and system for selecting accelerating server
CN103581987B (en) The test method and device of the page download speed of mobile terminal device
US10796038B2 (en) Estimating think times
WO2017084579A1 (en) Thermodynamic diagram generating method and device
CN105991511A (en) Method and device for detecting CC attack
CN106131175A (en) A kind of acquisition of information, information-pushing method and equipment
CN104270362B (en) request processing method and device
CN107085554A (en) A kind of method and apparatus for adding control mark
CN103647775B (en) Method and apparatus for registration in webpage
CN107592522A (en) A kind of method and device for detecting video resolution
CN104717312B (en) A kind of determining method and device for accessing Internet resources interface
CN104376056B (en) A kind of method and apparatus of data processing
CN104582011B (en) A kind of method and apparatus for mobile terminal to be connected to network
CN102866885A (en) Method and device for confirming clicking position in webpage
CN106323266A (en) POI position information processing method and device
CN105787750A (en) Information pushing method and information pushing device
CN105515894B (en) A kind of test method and test device that can judgement surf the Internet
CN106533528B (en) The two-way time compares compression and the calculation method of modem transmitted data amount
CN105992280A (en) Method and device for data processing
CN107360059B (en) Network detecting method, network detection device and intelligent terminal
CN107153663B (en) A kind of domain name resources caching method and device

Legal Events

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

Effective date of registration: 20201209

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 No. 3666 Sixian Road, Songjiang District, Shanghai

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221230

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.