Method and device for acquiring web page resources
A web resource and acquisition method technology, applied in the field of web resource acquisition methods and devices, can solve the problems of inability to acquire web page resources from CDN, target web pages cannot be accessed normally, etc., and achieve the effect of improving reliability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] According to an embodiment of the present invention, a method for obtaining web resources is provided. Such as figure 2 As shown, the method can include:
[0032] S202: Access the target webpage according to the webpage access request, and request the content delivery network CDN (Content Delivery Network) to obtain the first webpage resource that needs to be loaded in the target webpage;
[0033] S204: Determine whether the first webpage resource is successfully obtained, where
[0034] If not, perform step S206;
[0035] S206: Obtain a second webpage resource consistent with the content of the first webpage resource from a backup network other than the CDN.
[0036] According to the method for obtaining webpage resources provided by the embodiment of the present invention, in step S102, the target webpage may be accessed according to the webpage access request, and the CDN may be requested to obtain the first webpage resource that needs to be loaded in the target webpage...
Embodiment 2
[0134]根据本发明实施例,还提供了一种用于实施上述网页资源获取方法的网页资源获取装置。如图11所示,该装置可以包括:
[0135]1)访问单元1102,用于根据网页访问请求对目标网页进行访问,并向CDN请求获取需要加载在目标网页中的第一网页资源;
[0136]2)判断单元1104,用于判断是否成功获取第一网页资源;
[0137]3)第一获取单元1106,用于在未成功获取第一网页资源时,从CDN以外的备份网络获取与第一网页资源的内容一致的第二网页资源。
[0138]根据本发明实施例提供的网页资源获取装置,在访问单元1102中,可以根据网页访问请求对目标网页进行访问,并向CDN请求获取需要加载在所述目标网页中的第一网页资源。
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


