A kind of method of local portal cachingTechnical field
The present invention relates to a kind of networking certification technology, be specifically related to a kind of local portal cachingMethod.
Background technology
When mobile terminal device (mobile phone, notebook computer and pad etc.) connects wifi equipment,Ejected portal certification page by wifi equipment, certification just must can obtain access authority by rear,Certificate server pointed by certification page is in the Internet, by the authentication service in the InternetAfter the online legitimacy of device detection mobile terminal, give this user's access authority;Work as authentication serviceWhen device breaks down, the not always on certification page of mobile terminal device can be caused, cause recognizingCard is not by obtaining access authority;When network-like to certificate server end of wifi equipment endWhen condition is blocked up, mobile phone users can be caused to open certification page very slow, have impact on making of userWith experience.
Summary of the invention
It is an object of the invention to for deficiency of the prior art, it is provided that a kind of local portalThe method of caching, when making mobile terminal device connect wifi, wifi equipment the portal ejectedThe page is the most more reliable, promotes the experience of wifi equipment.
For achieving the above object, the invention discloses following technical scheme:
A kind of method of local portal caching, comprises the steps:
S1.wifi equipment utilizes http agreement to report self portal version number for every n minuteIn certificate server, certificate server by contrast wifi equipment portal version number andThe portal version number that server is up-to-date, being found to have redaction needs upgrading, then reply wifiEquipment needs upgrading;
Wherein, n is interval time set in advance;
S2.wifi equipment receives and needs, from certificate server A, the portal version of upgradingAfter reply, resolve the url list that certificate server A replys, and start under portal page faceCurrent-carrying journey, is downloaded each page in url list and is stored to wifi equipment flashIn;
S3. mobile terminal device is connected to wifi equipment, and when accessing 80 port, wifiEquipment ejects the portal page face that local cache is good, mobile terminal device by redirecting techniqueOnline validity judgement transfer to the javascript script in portal page face to complete.
Further, in described step S1, wifi equipment utilizes http agreement in every 5 minutesReport self portal version number in certificate server.
The method of a kind of local portal caching disclosed by the invention, has the advantages that
1, use portal page face caching to local mode, can effectively improve user's bulletGoing out the speed of portal certification page, mobile terminal device need not access registrar service every timeDevice, alleviates certificate server pressure;
2, when certificate server breaks down, wifi equipment still can eject portalCertification page, and the fault of certificate server is judged by page javascript script, recognizingDuring card server failure, the Internet data of clearance mobile terminal device, is greatly improved making of userWith experience.
Accompanying drawing explanation
Fig. 1 is the network topological diagram of the present invention;
Fig. 2 is the sequence chart of the present invention
Detailed description of the invention
Below in conjunction with embodiment and referring to the drawings the invention will be further described.
Refer to Fig. 1-Fig. 2.
A kind of method of local portal caching, comprises the steps:
S1.wifi equipment utilizes http agreement to report self portal version number for every 5 minutesIn certificate server, certificate server by contrast wifi equipment portal version number andThe portal version number that server is up-to-date, being found to have redaction needs upgrading, then reply wifiEquipment needs upgrading;
S2.wifi equipment receives and needs, from certificate server A, the portal version of upgradingAfter reply, resolve the url list that certificate server A replys, and start under portal page faceCurrent-carrying journey, is downloaded each page in url list and is stored to wifi equipment flashIn;
S3. mobile terminal device is connected to wifi equipment, and when accessing 80 port, wifiEquipment ejects the portal page face that local cache is good, mobile terminal device by redirecting techniqueOnline validity judgement transfer to the javascript script in portal page face to complete.
The present invention uses portal page face caching to local mode, can effectively improve useThe speed of portal certification page is ejected at family, and mobile terminal device need not access registrar every timeServer, alleviates certificate server pressure;Meanwhile, when certificate server breaks down,Wifi equipment still can eject portal certification page, and by page javascript footThe fault of this judgement certificate server, the clearance mobile terminal device when certificate server faultInternet data, is greatly improved the experience of user.
The above is only the preferred embodiment of the present invention, is not intended to limit;It should be pointed out that,Although the present invention being described in detail with reference to the various embodiments described above, the ordinary skill of this areaPersonnel should be appreciated that the technical scheme described in the various embodiments described above still can be repaiied by itChange, or the most some or all of technical characteristic is carried out equivalent;And these are revised and replaceChange, do not make the essence of corresponding technical scheme depart from the model of various embodiments of the present invention technical schemeEnclose.