CN111339461A - Page access method of application program and related product - Google Patents
Page access method of application program and related product Download PDFInfo
- Publication number
- CN111339461A CN111339461A CN202010097984.5A CN202010097984A CN111339461A CN 111339461 A CN111339461 A CN 111339461A CN 202010097984 A CN202010097984 A CN 202010097984A CN 111339461 A CN111339461 A CN 111339461A
- Authority
- CN
- China
- Prior art keywords
- webpage
- access request
- application program
- electronic equipment
- web 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本申请涉及互联网技术领域,具体涉及一种应用程序的页面访问方法及相关产品。The present application relates to the field of Internet technologies, in particular to a method for accessing pages of an application program and related products.
背景技术Background technique
随着终端的普及,人们会通过浏览器浏览各种新闻资讯以及查询内容。目前主流的移动显示终端的操作系统包括安卓和IOS,IOS是由苹果公司开发的移动操作系统。在I0S使用应用程序编程接口API和超文本标记语言HTML5.0混合开发时,在iOS系统下有两种方式访问H5页面:第一种是通过UIWebView访问H5页面,通过UIWebView访问的请求,应用程序可以拦截到h5的请求,从而可以编写h5页面和资源预加载的逻辑,从而实现页面快速打开的优化效果,然而通过UIWebView发出的请求,请求的http协议版本是1.1的,不支持http2.0这种方式。因此当后台服务器已经支持http2.0时,如果继续使用UIWebView访问,就无法享受到http2.0所带来的性能提升。第二种是通过WKWebView访问H5页面,通过UIWebView发出的请求,请求的http协议版本即支持http1.1,又支持http2.0,因此,当后台服务器支持http2.0时,使用WKWebView这种方式访问h5,就可以享受到http2.0所带来的性能提升。但是,WKWebView这种方式的缺点是,app无法拦截webView发出的请求,因此开发人员无法通过拦截请求然后把资源立即返回给h5的方式来进行页面的加载优化。With the popularization of terminals, people will browse various news information and query content through browsers. At present, the operating systems of mainstream mobile display terminals include Android and IOS, and IOS is a mobile operating system developed by Apple. When I0S uses the application programming interface API and HTML5.0 mixed development, there are two ways to access H5 pages under the iOS system: the first is to access the H5 page through UIWebView, the request accessed through UIWebView, the application H5 requests can be intercepted, so that the logic for preloading h5 pages and resources can be written, so as to achieve the optimization effect of fast page opening. However, for requests sent through UIWebView, the requested http protocol version is 1.1, which does not support http2.0. a way. Therefore, when the background server already supports http2.0, if you continue to use UIWebView to access, you will not be able to enjoy the performance improvement brought by http2.0. The second is to access the H5 page through WKWebView, and through the request sent by UIWebView, the requested http protocol version supports both http1.1 and http2.0. Therefore, when the background server supports http2.0, use WKWebView to access this way h5, you can enjoy the performance improvement brought by http2.0. However, the disadvantage of this method of WKWebView is that the app cannot intercept the request sent by the webView, so the developer cannot optimize the page load by intercepting the request and then returning the resource to h5 immediately.
因此,为了体验到http2.0所带来的性能提升,现有的方案通常是在终端上内置WKWebView,以通过WKWebView来访问H5页面,以实现支持http2.0,由于通过WKWebView来访问H5页面,无法拦截网页访问请求,也就不能预览网页,进而不能实现优化页面的加载,降低了用户体验。Therefore, in order to experience the performance improvement brought by http2.0, the existing solution is usually to build WKWebView on the terminal to access H5 pages through WKWebView to support http2.0. Since WKWebView is used to access H5 pages, If the webpage access request cannot be intercepted, the webpage cannot be previewed, and the page loading cannot be optimized, which reduces the user experience.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种应用程序的页面访问方法,通过UIWebView拦截网页访问请求,以及通过应用程序发送访问请求,进而在访问网页时,实现页面预览以及支持http2.0。The embodiment of the present application provides a method for accessing a page of an application program, which intercepts a web page access request through UIWebView, and sends an access request through an application program, thereby realizing page preview and supporting http2.0 when accessing a web page.
第一方面,本申请实施例提供一种应用程序的页面访问方法,所述应用程序应用于电子设备,所述应用程序为电子设备中的任意一个应用,所述应用程序通过接口调用所述电子设备中内置的浏览器控件,所述方法包括:In a first aspect, an embodiment of the present application provides a method for accessing a page of an application program, where the application program is applied to an electronic device, the application program is any application in the electronic device, and the application program calls the electronic device through an interface. The built-in browser control in the device, the method includes:
在建立访问网页的线程时,所述电子设备通过所述应用程序调用用户界面网络视图用户界面网络视图向全球广域网web服务器发起网页访问请求;When the thread for accessing the webpage is established, the electronic device invokes the user interface web view user interface web view through the application program to initiate a webpage access request to the global wide area network web server;
所述电子设备通过所述用户界面网络视图对所述网页访问请求进行拦截,并在缓存中查找与所述网页访问请求对应的网页资源,以预加载所述网页资源;The electronic device intercepts the web page access request through the user interface web view, and searches the cache for a web page resource corresponding to the web page access request, so as to preload the web page resource;
所述电子设备通过所述应用程序向所述web服务器发送所述网页访问请求;The electronic device sends the web page access request to the web server through the application program;
所述电子设备接收所述web服务器返回的所述网页访问请求的网页资源。The electronic device receives the web page resource of the web page access request returned by the web server.
第二方面,本申请实施例提供一应用程序的页面访问装置,其特征在于,所述访问装置应用于电子装置,所述应用程序应用于电子设备,所述应用程序为访问装置中的任意一个应用,所述应用程序通过接口调用所述访问装置中内置的浏览器控件,包括:In a second aspect, an embodiment of the present application provides a page access device for an application program, wherein the access device is applied to an electronic device, the application program is applied to an electronic device, and the application program is any one of the access devices application, the application program invokes the built-in browser control in the access device through the interface, including:
生成单元,用于在建立访问网页的线程时,通过所述应用程序的接口调用用户界面网络视图用户界面网络视图生成网页访问请求;a generating unit, configured to generate a web page access request by invoking the user interface web view user interface web view through the interface of the application program when a thread for accessing the web page is established;
拦截单元,用于通过所述用户界面网络视图对所述网页访问请求进行拦截,并查找与所述网页访问请求对应的本地网页资源,以预加载所述本地网页资源;an intercepting unit, configured to intercept the web page access request through the user interface web view, and search for a local web page resource corresponding to the web page access request, so as to preload the local web page resource;
发送单元,用于通过所述应用程序向全球广域网web服务器发送所述网页访问请求;a sending unit, configured to send the web page access request to a global wide area network web server through the application program;
接收单元,用于接收所述web服务器返回的与所述网页访问请求对应的线上网页资源。A receiving unit, configured to receive the online web page resource corresponding to the web page access request returned by the web server.
第三方面,本申请实施例提供一种电子设备,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如第一方面所述的方法中的步骤的指令。In a third aspect, embodiments of the present application provide an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured by The processor executes the program comprising instructions for performing the steps in the method of the first aspect.
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得计算机执行如第一方面所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program causes a computer to execute the method according to the first aspect.
第五方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机可操作来使计算机执行如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer is operable to cause the computer to execute as described in the first aspect Methods.
实施本申请实施例,具有如下有益效果:Implementing the embodiments of the present application has the following beneficial effects:
可以看出,在本申请实施例中,在应用程序中生成网页访问请求时,先通过UIWebView拦截该网页访问请求,实现预加载与该网页访问请求对应的网页资源;然后,在通过应用程序将该网页访问请求发送给web服务器,以从该服务器中下载该网页资源;由于应用程序发出的网页访问请求支持http2.0。因此,在拦截该网页访问请求,实现预加载的同时,又支持http2.0,实现快速加载网页。It can be seen that, in the embodiment of the present application, when a web page access request is generated in an application, the web page access request is first intercepted by UIWebView to realize preloading of web page resources corresponding to the web page access request; The web page access request is sent to the web server to download the web page resource from the server; the web page access request sent by the application program supports http2.0. Therefore, while intercepting the webpage access request to achieve preloading, it also supports http2.0 to achieve fast loading of webpages.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为本申请实施例提供的一种应用程序的页面访问方法的流程示意图;1 is a schematic flowchart of a method for accessing a page of an application program provided by an embodiment of the present application;
图2为本申请实施例提供的另一种应用程序的页面访问方法的流程示意图;2 is a schematic flowchart of another application page access method provided by an embodiment of the present application;
图3为本申请实施例提供的另一种应用程序的页面访问方法的流程示意图;3 is a schematic flowchart of another application page access method provided by an embodiment of the present application;
图4为本申请实施例提供的一种访问装置的结构示意图;FIG. 4 is a schematic structural diagram of an access device according to an embodiment of the present application;
图5为本申请实施例提供的一种访问装置的功能单元组成框图。FIG. 5 is a block diagram of functional units of an access device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the description and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结果或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, result, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
本申请中的访问装置可以包括智能手机(如Android手机、iOS手机、WindowsPhone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备MID(Mobile InternetDevices,简称:MID)或穿戴式设备等。上述访问装置仅是举例,而非穷举,包含但不限于上述电子设备。在实际应用中,上述访问装置,还可以包括:智能车载终端、计算机设备等等。The access device in this application may include a smart phone (such as an Android phone, an iOS phone, a Windows Phone, etc.), a tablet computer, a PDA, a notebook computer, a mobile Internet device MID (Mobile Internet Devices, MID for short) or a wearable device, etc. The above-mentioned access devices are only examples, not exhaustive, including but not limited to the above-mentioned electronic devices. In practical applications, the above-mentioned access device may further include: an intelligent vehicle-mounted terminal, a computer device, and the like.
为了理解本申请实施例,首先对部分术语进行解释说明。In order to understand the embodiments of the present application, some terms are first explained.
UIWebView是苹果操作系统IoS SDK(Software Development Kit,软件开发工具包)中一个常用的控件工具,是内置的浏览器控件,可以用它来浏览网页、打开文档等等,可实现浏览器的功能。UIWebView is a commonly used control tool in the IoS SDK (Software Development Kit, Software Development Kit) of Apple's operating system. It is a built-in browser control, which can be used to browse web pages, open documents, etc., and realize the functions of a browser.
WKWebView为对UIWebView的改进,相对于UIWebView来说,在性能、稳定性、占用内存方面有很大提升;允许JavaScript的Nitro库加载并使用(UIWebView中限制)增加加载进度属性estimatedProgress,不用加载进度条;支持更多的HTML网页的属性。WKWebView is an improvement to UIWebView. Compared with UIWebView, it has a great improvement in performance, stability and memory usage; it allows JavaScript Nitro library to be loaded and used (limited in UIWebView) to increase the loading progress attribute estimatedProgress without loading progress bar ; Support more attributes of HTML pages.
通过UIWebView访问H5页面时,可以编写h5页面和资源预加载的逻辑,从而实现页面快速打开的优化效果但是,通过UIWebView发出的请求,该请求的http协议版本是1.1的,不支持http2.0这种方式。When accessing H5 pages through UIWebView, you can write the logic of preloading h5 pages and resources, so as to achieve the optimization effect of quick page opening. However, the request sent through UIWebView, the HTTP protocol version of the request is 1.1, which does not support http2.0. a way.
通过WKWebView访问H5页面时,通过UIWebView发出的请求,该请求的http协议版本即支持http1.1,又支持http2.0。When accessing H5 pages through WKWebView, the request sent through UIWebView supports both http1.1 and http2.0 in the http protocol version of the request.
参阅图1,图1为本申请实施例提供的一种应用程序的页面访问方法的流程示意图。该应用程序应用于电子设备,该应用程序为电子设备中的任意一个应用,该应用程序通过接口调用电子设备中内置的浏览器控件。本实施例的方法包括以下步骤:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a method for accessing a page of an application program according to an embodiment of the present application. The application program is applied to the electronic device, the application program is any application in the electronic device, and the application program invokes the built-in browser control in the electronic device through an interface. The method of this embodiment includes the following steps:
101:在建立访问网页的线程时,电子设备通过所述应用程序的接口调用用户界面网络视图UIWebView生成网页访问请求。101: When establishing a thread for accessing a web page, the electronic device invokes a user interface web view UIWebView through an interface of the application program to generate a web page access request.
可选的,该访问网页的线程为在该启动该应用程序时,在该应用程序的启动线程中又建立的其他线程。Optionally, the thread for accessing the webpage is another thread created in the startup thread of the application when the application is started.
具体来讲,在建立该启动线程的基础上接收到跳转指令时,则并行的建立与该跳转指令对应的跳转线程,比如,在该应用程序的显示界面上点击了链接或者广告,则会生成访问该链接或者广告的页面访问线程;或者,在建立该启动线程的基础上接收到刷新指令时,则建立与该刷新指令对应的页面访问线程,等等。Specifically, when a jump instruction is received on the basis of establishing the startup thread, a jump thread corresponding to the jump instruction is established in parallel. For example, if a link or advertisement is clicked on the display interface of the application, A page access thread for accessing the link or advertisement is generated; or, when a refresh instruction is received based on the establishment of the startup thread, a page access thread corresponding to the refresh instruction is created, and so on.
因此,当建立页面访问线程时,通过该应用程序的接口调用UIWebView控件,提取该页面访问线程对应的统一资源定位符URL(universal resource locator,URL),基于该统一资源定位符URL生成网页访问请求。Therefore, when a page access thread is established, the UIWebView control is called through the interface of the application program, the uniform resource locator URL (URL) corresponding to the page access thread is extracted, and a web page access request is generated based on the uniform resource locator URL. .
具体来说,可通过生成httprequest对象,将提取到的统一资源定位符URL作为目标地址赋值给该httprequest对象来生成网页访问请求。Specifically, the webpage access request can be generated by generating an httprequest object, and assigning the extracted URL as a target address to the httprequest object.
102:电子设备通过所述UIWebView对所述网页访问请求进行拦截,并在缓存中查找与所述网页访问请求对应的网页资源,以预加载所述网页资源。102: The electronic device intercepts the web page access request through the UIWebView, and searches the cache for a web page resource corresponding to the web page access request, so as to preload the web page resource.
可选的,在生成网页访问请求后,通过UIWebView对所述网页访问请求进行拦截,并在缓存中查找与所述网页访问请求对应的网页资源,以预加载所述网页资源。Optionally, after the webpage access request is generated, the webpage access request is intercepted by UIWebView, and the webpage resource corresponding to the webpage access request is searched in the cache to preload the webpage resource.
可选的,在对所述网页访问请求进行拦截之前,电子设备首先解析该网页访问请求的头文件,在确定该头文件表征该网页访问请求需要进行页面预加载时,则从本地资源中查找与该网页访问请求对应的本地网页资源。Optionally, before intercepting the web page access request, the electronic device first parses the header file of the web page access request, and when it is determined that the header file represents that the web page access request requires page preloading, it searches from local resources. The local webpage resource corresponding to the webpage access request.
具体来说,对于UIWebView发出的请求,app可以通过NSUrlProtocol进行拦截,即自定义一个NSUrlProtocol子类,并注册到URL loading system中,UIWebView在发出网页请求时,就会被自定义的NSUrlProtocol子类拦截。所以,在判断到该网页请求对应的网页资源为预加载的资源时,进行拦截,然后在缓存中查找与该网页访问请求对应的本地网页资源,把该本地网页资源读进内存,然后构建一个HTTP请求的响应NSHTTPUrlResponse,然后通过NSUrlProtocol提供的回调机制返回给UIWebView,实现网页预加载。Specifically, for the request sent by UIWebView, the app can intercept it through NSUrlProtocol, that is, customize a NSUrlProtocol subclass and register it in the URL loading system. When UIWebView sends a web page request, it will be intercepted by the custom NSUrlProtocol subclass . Therefore, when judging that the web page resource corresponding to the web page request is a preloaded resource, intercept it, then look up the local web page resource corresponding to the web page access request in the cache, read the local web page resource into the memory, and then construct a The response of the HTTP request is NSHTTPUrlResponse, and then returned to UIWebView through the callback mechanism provided by NSUrlProtocol to realize web page preloading.
103:电子设备通过所述应用程序向全球广域网web服务器发送所述网页访问请求。103: The electronic device sends the webpage access request to the global wide area network web server through the application program.
可选的,电子设备调用该应用程序中系统自带的请求发送函数,通过该请求发送函数将该网页请求发送到服务器,该web服务器为与该统一资源定位符对应的web服务器。电子设备通过应用程序发送网页访问请求时,得到该网页页面。由于电子设备不同控件发送网页访问请求,其发送的请求中的http协议版本即支持http1.1,又支持http2.0,所以在实现页面预加载的同时,又使用http2.0快速加载页面的优势。Optionally, the electronic device calls a request sending function provided by the system in the application program, and sends the web page request to a server through the request sending function, where the web server is a web server corresponding to the uniform resource locator. When the electronic device sends a web page access request through an application program, the web page is obtained. Since different controls of the electronic device send web page access requests, the http protocol version in the request sent supports both http1.1 and http2.0, so while implementing page preloading, it also uses the advantages of http2.0 to quickly load pages .
104:电子设备接收所述web服务器返回的所述网页访问请求的网页资源。104: The electronic device receives the web page resource of the web page access request returned by the web server.
可以看出,在本申请实施方式中,在应用程序中生成网页访问请求时,先通过UIWebView拦截该网页访问请求,实现预加载与该网页访问请求对应的网页资源;然后,在通过应用程序将该网页访问请求发送给web服务器,以从该服务器中下载该网页资源;由于应用程序发出的网页访问请求支持http2.0。因此,在拦截该网页访问请求,实现预加载的同时,又支持http2.0,实现快速加载网页。It can be seen that, in the embodiment of the present application, when a webpage access request is generated in an application, the webpage access request is first intercepted by UIWebView to realize preloading of webpage resources corresponding to the webpage access request; The web page access request is sent to the web server to download the web page resource from the server; the web page access request sent by the application program supports http2.0. Therefore, while intercepting the webpage access request to achieve preloading, it also supports http2.0 to achieve fast loading of webpages.
在一些可能的实施方式中,所述电子设备通过所述应用程序向全球广域网web服务器发送所述网页访问请求之前,所述方法还包括:In some possible implementation manners, before the electronic device sends the webpage access request to the global wide area network web server through the application program, the method further includes:
所述电子设备在目标资源池中查询是否能存在与所述网页请求对应的历史传输控制协议(TCP,Transmission Control Protocol,TCP)连接,如存在,则通过所述历史TCP连接获取所述网页访问请求对应的网页资源,无需向所述web服务器发送所述网页访问请求,所述目标资源池是所述电子设备基于历史TCP连接建立的。The electronic device inquires whether there is a historical Transmission Control Protocol (TCP, Transmission Control Protocol, TCP) connection corresponding to the webpage request in the target resource pool, and if so, obtains the webpage access through the historical TCP connection To request the corresponding web page resource, it is not necessary to send the web page access request to the web server, and the target resource pool is established by the electronic device based on the historical TCP connection.
具体来说,对该应用程序中已经建立连接的tcp连接进行统一管理,得到资源池,在电子设备向web服务器发送网页访问请求时,在所述资源池中查询与该网页请求对应的历史TCP连接,通过该TCP连接获取网页资源。因此,在通过应用程序统一发送UIWebview的网页访问请求之后,而应用程序发送的网页访问请求是http2.0。由于http2.0的一个特点是多路复用机制,已经建立的连接可以直接复用,因为UIWebview和应用程序发送的网页请求有很多是同一域名的(同一域名的连接可以直接复用),应用程序在统一发送网页访问请求时,可以复用历史TCP连接进行网页访问,无需重新建立TCP连接才能发出请求,提高了页面访问速度。Specifically, unified management is performed on the tcp connections that have been established in the application to obtain a resource pool, and when the electronic device sends a web page access request to the web server, the historical TCP corresponding to the web page request is queried in the resource pool. connection, and obtain webpage resources through the TCP connection. Therefore, after the web page access request of UIWebview is sent uniformly through the application, the web page access request sent by the application is http2.0. Since a feature of http2.0 is the multiplexing mechanism, the established connections can be reused directly, because many web page requests sent by UIWebview and the application are of the same domain name (the connections of the same domain name can be directly reused), the application When the program sends a web page access request uniformly, it can reuse the historical TCP connection to access the web page, and the request can be sent without re-establishing the TCP connection, which improves the page access speed.
在一些可能的实施方式中,所述方法还包括:In some possible implementations, the method further includes:
所述电子设备解析所述线上网页资源的数据大小,并获取对所述线上网页资源的下载速度,通过所述UIwebview展示所述数据大小和/或下载速度。The electronic device parses the data size of the online web page resource, obtains the download speed of the online web page resource, and displays the data size and/or download speed through the UI webview.
在实施方式中,实时展示数据大小和/或下载速度,以便用户及时知晓网页加载信息,提高用户体验。In an implementation manner, the data size and/or download speed are displayed in real time, so that the user can know the webpage loading information in time, and the user experience can be improved.
在一些可能的实施方式中,所述方法还包括:In some possible implementations, the method further includes:
所述电子设备解析所述线上网页资源的数据类型;The electronic device parses the data type of the online webpage resource;
在所述数据类型为图像数据时,所述电子设备从已分配的显存块中选出与所述数据大小匹配的目标显存块;When the data type is image data, the electronic device selects a target video memory block that matches the data size from the allocated video memory blocks;
所述电子设备将所述网页资源缓存至所述目标显存块,通过所述UIwebview从所述目标显存块中渲染所述网页资源,以显示所述网页资源对应的图像。The electronic device caches the web page resource to the target video memory block, and renders the web page resource from the target video memory block through the UIwebview to display an image corresponding to the web page resource.
在一些可能的实施方式中,在缓存所述线上网页资源之后,所述方法还包括:In some possible implementations, after caching the online webpage resource, the method further includes:
获取剩余缓存空间,并显示所述剩余缓存空间。Obtain the remaining cache space and display the remaining cache space.
在一些可能的实施方式中,所述方法还包括:In some possible implementations, the method further includes:
所述电子设备获取预先设置的显示规则,所述显示规则包括以下至少一种:缩放网页、调整显示字体或对标题加粗显示;The electronic device acquires a preset display rule, and the display rule includes at least one of the following: zooming the webpage, adjusting the display font, or displaying the title in bold;
所述电子设备根据所述显示规则对所述网页资源进行显示。The electronic device displays the webpage resource according to the display rule.
参阅图2,图2为本申请实施例提供的另一种应用程序的页面访问方法的流程示意图。该实施例中与图1所示的实施例相同的内容,此处不再重复描述。该应用程序应用于电子设备。本实施例的方法包括以下步骤:Referring to FIG. 2 , FIG. 2 is a schematic flowchart of another application page access method provided by an embodiment of the present application. The content of this embodiment is the same as that of the embodiment shown in FIG. 1 , and the description is not repeated here. The application is applied to electronic devices. The method of this embodiment includes the following steps:
201:在建立访问网页的线程时,电子设备通过所述应用程序的接口调用用户界面网络视图UIWebView生成网页访问请求。201 : When establishing a thread for accessing a webpage, the electronic device invokes a user interface web view UIWebView through the interface of the application program to generate a webpage access request.
202:电子设备解析所述网页访问请求的头文件,在确定所述头文件表征所述网页访问请求需要进行页面预加载时,通过所述UIWebView对所述网页访问请求进行拦截。202: The electronic device parses the header file of the web page access request, and intercepts the web page access request through the UIWebView when determining that the header file indicates that the web page access request needs to be preloaded.
203:电子设备查找与所述网页访问请求对应的本地网页资源,以预加载所述本地网页资源。203: The electronic device searches for a local web page resource corresponding to the web page access request, so as to preload the local web page resource.
204:电子设备通过所述应用程序向全球广域网web服务器发送所述网页访问请求。204: The electronic device sends the webpage access request to the global wide area network web server through the application program.
205:电子设备接收所述web服务器返回的与所述网页访问请求对应的线上网页资源。205: The electronic device receives the online web page resource corresponding to the web page access request returned by the web server.
206:电子设备解析所述线上网页资源的数据大小,并获取对所述线上网页资源的下载速度,通过所述UIwebview展示所述数据大小和/或下载速度。206: The electronic device parses the data size of the online web page resource, obtains the download speed of the online web page resource, and displays the data size and/or download speed through the UI webview.
需要说明的是,图2所示的方法的各个步骤的具体实现过程可参见上述图1所述方法的具体实现过程,在此不再叙述。It should be noted that, for the specific implementation process of each step of the method shown in FIG. 2 , reference may be made to the specific implementation process of the method shown in FIG. 1 , which is not described here.
可以看出,在本申请实施方式中,在应用程序中生成网页访问请求时,先通过UIWebView拦截该网页访问请求,实现预加载与该网页访问请求对应的网页资源;然后,在通过应用程序将该网页访问请求发送给web服务器,以从该服务器中下载该网页资源;由于应用程序发出的网页访问请求支持http2.0。因此,在拦截该网页访问请求,实现预加载的同时,又支持http2.0,实现快速加载网页;而且,在拦截先判断是否需要拦截,进而提高网页访问的灵活性。It can be seen that, in the embodiment of the present application, when a webpage access request is generated in an application, the webpage access request is first intercepted by UIWebView to realize preloading of webpage resources corresponding to the webpage access request; The web page access request is sent to the web server to download the web page resource from the server; the web page access request sent by the application program supports http2.0. Therefore, while intercepting the web page access request to realize preloading, it also supports http2.0 to realize fast loading of the web page; moreover, it is judged whether interception is necessary before interception, thereby improving the flexibility of web page access.
参阅图3,图3为本申请实施例提供的另一种应用程序的页面访问方法的流程示意图。该实施例中与图1、图2所示的实施例相同的内容,此处不再重复描述。该应用程序应用于电子设备。本实施例的方法包括以下步骤:Referring to FIG. 3 , FIG. 3 is a schematic flowchart of another application page access method provided by an embodiment of the present application. The content of this embodiment is the same as that of the embodiment shown in FIG. 1 and FIG. 2 , and the description is not repeated here. The application is applied to electronic devices. The method of this embodiment includes the following steps:
301:在建立访问网页的线程时,电子设备通过所述应用程序的接口调用用户界面网络视图UIWebView生成网页访问请求。301: When establishing a thread for accessing a webpage, the electronic device invokes a user interface web view UIWebView through the interface of the application program to generate a webpage access request.
302:电子设备解析所述网页访问请求的头文件,在确定所述头文件表征所述网页访问请求需要进行页面预加载时,通过所述UIWebView对所述网页访问请求进行拦截。302: The electronic device parses the header file of the web page access request, and intercepts the web page access request through the UIWebView when determining that the header file indicates that the web page access request needs to be preloaded.
303:电子设备查找与所述网页访问请求对应的本地网页资源,以预加载所述本地网页资源。303: The electronic device searches for a local web page resource corresponding to the web page access request to preload the local web page resource.
304:电子设备确定在目标资源池中查询是否存在与所述网页请求对应的历史传输控制协议TCP连接;304: The electronic device determines whether there is a historical transmission control protocol TCP connection corresponding to the webpage request in the target resource pool;
如存在,执行步骤305;If there is, go to step 305;
如不存在,执行步306。If not, go to step 306.
305:电子设备复用所述历史TCP连接获取所述网页访问请求对应的线上网页资源。305: The electronic device multiplexes the historical TCP connection to obtain the online webpage resource corresponding to the webpage access request.
306:电子设备通过所述应用程序向全球广域网web服务器发送所述网页访问请求。306: The electronic device sends the webpage access request to the global wide area network web server through the application program.
307:电子设备接收所述web服务器返回的与所述网页访问请求对应的线上网页资源。307: The electronic device receives the online web page resource corresponding to the web page access request returned by the web server.
308:电子设备解析所述线上网页资源的数据大小,并获取对所述线上网页资源的下载速度,通过所述UIwebview展示所述数据大小和/或下载速度。308: The electronic device parses the data size of the online web page resource, obtains the download speed of the online web page resource, and displays the data size and/or download speed through the UI webview.
需要说明的是,图3所示的方法的各个步骤的具体实现过程可参见上述图1所述方法的具体实现过程,在此不再叙述。It should be noted that, for the specific implementation process of each step of the method shown in FIG. 3 , reference may be made to the specific implementation process of the method shown in FIG. 1 , which will not be described here.
可以看出,在本申请实施方式中,在应用程序中生成网页访问请求时,先通过UIWebView拦截该网页访问请求,实现预加载与该网页访问请求对应的网页资源;然后,在通过应用程序将该网页访问请求发送给web服务器,以从该服务器中下载该网页资源;由于应用程序发出的网页访问请求支持http2.0。因此,在拦截该网页访问请求,实现预加载的同时,又支持http2.0,实现快速加载网页;而且,建立了目标资源池,可通过复用历史TCP连接来获取网页连接,进一步提高页面加载速度。It can be seen that, in the embodiment of the present application, when a webpage access request is generated in an application, the webpage access request is first intercepted by UIWebView to realize preloading of webpage resources corresponding to the webpage access request; The web page access request is sent to the web server to download the web page resource from the server; the web page access request sent by the application program supports http2.0. Therefore, while intercepting the webpage access request to achieve preloading, it also supports http2.0 to achieve fast loading of webpages; moreover, a target resource pool is established, and webpage connections can be obtained by reusing historical TCP connections to further improve page loading. speed.
与上述图1、图2、图3所示的实施例一致的,请参阅图4,图4为本申请实施例提供的一种访问装置400的结构示意图。如图4所示,该访问装置400包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序不同于上述一个或多个应用程序,且上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:Consistent with the embodiments shown in FIG. 1 , FIG. 2 , and FIG. 3 above, please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an access device 400 according to an embodiment of the present application. As shown in FIG. 4 , the access device 400 includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are different from the one or more application programs, and the one or more programs Stored in the above-mentioned memory and configured to be executed by the above-mentioned processor, the above-mentioned program includes instructions for performing the following steps:
在建立访问网页的线程时,通过应用程序的接口调用用户界面网络视图UIWebView生成网页访问请求,其中,所述应用程序应用于访问装置400,所述应用程序为电子设备中的任意一个应用,所述应用程序通过接口调用所述电子设备中内置的浏览器控件;When a thread for accessing a web page is established, the user interface web view UIWebView is invoked through the interface of the application program to generate a web page access request, wherein the application program is applied to the access device 400, and the application program is any application in the electronic device, so The application program calls the built-in browser control in the electronic device through the interface;
通过所述UIWebView对所述网页访问请求进行拦截,并查找与所述网页访问请求对应的本地网页资源,以预加载所述本地网页资源;Intercept the web page access request through the UIWebView, and search for the local web page resource corresponding to the web page access request, so as to preload the local web page resource;
通过所述应用程序向全球广域网web服务器发送所述网页访问请求;Send the web page access request to the global wide area network web server through the application program;
接收所述web服务器返回的与所述网页访问请求对应的线上网页资源。Receive an online web page resource corresponding to the web page access request returned by the web server.
在一些可能的实施方式中,设备通过所述UIWebView对所述网页访问请求进行拦截之前,上述程序还用于执行以下步骤的指令:In some possible implementations, before the device intercepts the webpage access request through the UIWebView, the above program is further used to execute the instructions of the following steps:
解析所述网页访问请求的头文件;Parse the header file of the web page access request;
在确定所述头文件表征所述网页访问请求需要进行页面预加载时,通过所述UIWebView对所述网页访问请求进行拦截。When it is determined that the header file indicates that the web page access request needs to be preloaded, the web page access request is intercepted by the UIWebView.
在一些可能的实施方式中,在通过所述UIWebView对所述网页访问请求进行拦截方面,上述程序具体用于执行以下步骤的指令:In some possible implementations, in terms of intercepting the web page access request through the UIWebView, the above program is specifically used to execute the instructions of the following steps:
通过预先注册到URL loading system的NSUrl Protocol子类对所述网页访问请求进行拦截。The web page access request is intercepted by the NSUrl Protocol subclass pre-registered to the URL loading system.
在一些可能的实施方式中,通过所述应用程序向全球广域网web服务器发送所述网页访问请求之前,上述程序还用于执行以下步骤的指令:In some possible implementations, before the application program sends the webpage access request to the global wide area network web server, the above-mentioned program is further used to execute the instructions of the following steps:
在目标资源池中查询是否存在与所述网页请求对应的历史传输控制协议TCP连接,如存在,则复用所述历史TCP连接获取所述网页访问请求对应的线上网页资源,无需向所述web服务器发送所述网页访问请求,所述目标资源池是所述电子设备基于历史TCP连接建立的。Query whether there is a historical transmission control protocol TCP connection corresponding to the web page request in the target resource pool. If there is, reuse the historical TCP connection to obtain the online web page resource corresponding to the web page access request. The web server sends the web page access request, and the target resource pool is established by the electronic device based on a historical TCP connection.
在一些可能的实施方式中,上述程序还用于执行以下步骤的指令:In some possible implementations, the above program is also used to execute the instructions of the following steps:
解析所述线上网页资源的数据大小,并获取对所述线上网页资源的下载速度,通过所述UIwebview展示所述数据大小和/或下载速度。Parse the data size of the online webpage resource, obtain the download speed of the online webpage resource, and display the data size and/or download speed through the UIwebview.
在一些可能的实施方式中,上述程序还用于执行以下步骤的指令:In some possible implementations, the above program is also used to execute the instructions of the following steps:
解析所述线上网页资源的数据类型;Parse the data type of the online webpage resource;
在所述数据类型为图像数据时,从已分配的显存块中选出与所述数据大小匹配的目标显存块;When the data type is image data, select a target video memory block that matches the data size from the allocated video memory blocks;
将所述网页资源缓存至所述目标显存块,通过所述UIwebview从所述目标显存块中渲染所述网页资源,以显示所述网页资源对应的图像。Cache the web page resource to the target video memory block, and render the web page resource from the target video memory block through the UIwebview to display an image corresponding to the web page resource.
在一些可能的实施方式中,上述程序还用于执行以下步骤的指令:In some possible implementations, the above program is also used to execute the instructions of the following steps:
获取预先设置的显示规则,所述显示规则包括以下至少一种:缩放网页、调整显示字体或对标题加粗显示;Acquire a preset display rule, where the display rule includes at least one of the following: zooming the webpage, adjusting the display font, or displaying the title in bold;
根据所述显示规则对所述网页资源进行显示。The webpage resource is displayed according to the display rule.
参阅图5,图5示出了上述实施例中所涉及的访问装置500的一种可能的功能单元组成框图,访问装置500包括:生成单元510、拦截单元520、发送单元530和接收单元540,其中:Referring to FIG. 5, FIG. 5 shows a block diagram of a possible functional unit of the access device 500 involved in the above-mentioned embodiment. The access device 500 includes: a generating unit 510, an intercepting unit 520, a sending unit 530, and a receiving unit 540, in:
生成单元510,用于在建立访问网页的线程时,通过所述应用程序的接口调用用户界面网络视图UIWebView生成网页访问请求;A generating unit 510, configured to generate a web page access request by invoking a user interface web view UIWebView through an interface of the application program when a thread for accessing a web page is established;
拦截单元520,用于通过所述UIWebView对所述网页访问请求进行拦截,并查找与所述网页访问请求对应的本地网页资源,以预加载所述本地网页资源;An intercepting unit 520, configured to intercept the web page access request through the UIWebView, and search for a local web page resource corresponding to the web page access request, so as to preload the local web page resource;
发送单元530,用于通过所述应用程序向全球广域网web服务器发送所述网页访问请求;a sending unit 530, configured to send the web page access request to a global wide area network web server through the application program;
接收单元540,用于接收所述web服务器返回的与所述网页访问请求对应的线上网页资源。The receiving unit 540 is configured to receive the online web page resource corresponding to the web page access request returned by the web server.
在一些可能的实施方式中,在通过所述UIWebView对所述网页访问请求进行拦截之前,拦截单元520,还用于解析所述网页访问请求的头文件,在确定所述头文件表征所述网页访问请求需要进行页面预加载时,通过所述UIWebView对所述网页访问请求进行拦截。In some possible implementations, before intercepting the web page access request through the UIWebView, the intercepting unit 520 is further configured to parse the header file of the web page access request, and after determining that the header file represents the web page When the access request requires page preloading, the web page access request is intercepted by the UIWebView.
在一些可能的实施方式中,在通过所述UIWebView对所述网页访问请求进行拦截方面,拦截单元520,具体用于:In some possible implementation manners, in terms of intercepting the webpage access request through the UIWebView, the intercepting unit 520 is specifically configured to:
通过预先注册到URL loading system的NSUrl Protocol子类对所述网页访问请求进行拦截。The web page access request is intercepted by the NSUrl Protocol subclass pre-registered to the URL loading system.
在一些可能的实施方式中,访问装置500还包括查找单元550,通过所述应用程序向全球广域网web服务器发送所述网页访问请求之前,In some possible implementations, the access device 500 further includes a search unit 550, and before sending the web page access request to the global wide area network web server through the application program,
查找单元550,用于在目标资源池中查询是否存在与所述网页请求对应的历史传输控制协议TCP连接,如存在,则复用所述历史TCP连接获取所述网页访问请求对应的线上网页资源,无需向所述web服务器发送所述网页访问请求,所述目标资源池是所述电子设备基于历史TCP连接建立的。The search unit 550 is configured to query whether there is a historical transmission control protocol TCP connection corresponding to the webpage request in the target resource pool, and if so, multiplex the historical TCP connection to obtain the online webpage corresponding to the webpage access request resource without sending the webpage access request to the web server, and the target resource pool is established by the electronic device based on the historical TCP connection.
在一些可能的实施方式中,访问装置500还包括显示单元560;In some possible implementations, the access device 500 further includes a display unit 560;
显示单元560,用于解析所述线上网页资源的数据大小,并获取对所述线上网页资源的下载速度,通过所述UIwebview展示所述数据大小和/或下载速度。The display unit 560 is configured to parse the data size of the online web page resource, obtain the download speed of the online web page resource, and display the data size and/or download speed through the UI webview.
在一些可能的实施方式中,访问装置500还包括显示单元560;In some possible implementations, the access device 500 further includes a display unit 560;
显示单元560,用于解析所述线上网页资源的数据类型;a display unit 560, configured to parse the data type of the online web page resource;
在所述数据类型为图像数据时,从已分配的显存块中选出与所述数据大小匹配的目标显存块;When the data type is image data, select a target video memory block that matches the data size from the allocated video memory blocks;
将所述网页资源缓存至所述目标显存块,通过所述UIwebview从所述目标显存块中渲染所述网页资源,以显示所述网页资源对应的图像。Cache the web page resource to the target video memory block, and render the web page resource from the target video memory block through the UIwebview to display an image corresponding to the web page resource.
在一些可能的实施方式中,访问装置500还包括显示单元560;In some possible implementations, the access device 500 further includes a display unit 560;
显示单元560,用于获取预先设置的显示规则,所述显示规则包括以下至少一种:缩放网页、调整显示字体或对标题加粗显示;A display unit 560, configured to acquire preset display rules, where the display rules include at least one of the following: zooming a webpage, adjusting a display font, or displaying a title in bold;
根据所述显示规则对所述网页资源进行显示。The webpage resource is displayed according to the display rule.
本申请实施例还提供一种计算机存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现如上述方法实施例中记载的任何一种应用程序的页面访问方法的部分或全部步骤。Embodiments of the present application further provide a computer storage medium, where the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement page access of any application program as described in the foregoing method embodiments some or all of the steps of the method.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种应用程序的页面访问方法的部分或全部步骤。Embodiments of the present application further provide a computer program product, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to execute the methods described in the foregoing method embodiments Some or all of the steps in any application's page access method.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, and can also be implemented in the form of software program modules.
所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software program module and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a memory, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English: Random Access Memory, referred to as: RAM), magnetic disk or optical disk, etc.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been introduced in detail above, and the principles and implementations of the present application are described in this paper by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; at the same time, for Persons of ordinary skill in the art, based on the idea of the present application, will have changes in the specific implementation manner and application scope. In summary, the contents of this specification should not be construed as limitations on the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010097984.5A CN111339461A (en) | 2020-02-17 | 2020-02-17 | Page access method of application program and related product |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010097984.5A CN111339461A (en) | 2020-02-17 | 2020-02-17 | Page access method of application program and related product |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111339461A true CN111339461A (en) | 2020-06-26 |
Family
ID=71181586
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010097984.5A Pending CN111339461A (en) | 2020-02-17 | 2020-02-17 | Page access method of application program and related product |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111339461A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112256989A (en) * | 2020-10-21 | 2021-01-22 | 平安科技(深圳)有限公司 | Offline package-based page loading method, device, terminal device and storage medium |
| CN113094607A (en) * | 2021-04-08 | 2021-07-09 | 百度在线网络技术(北京)有限公司 | Method and device for acquiring local resources |
| CN114065082A (en) * | 2021-11-30 | 2022-02-18 | 中国建设银行股份有限公司 | Web page resource caching method, device and system |
| CN115033141A (en) * | 2021-03-04 | 2022-09-09 | 腾讯科技(深圳)有限公司 | Video generation method and device |
| CN115296915A (en) * | 2022-08-08 | 2022-11-04 | 广州华多网络科技有限公司 | Webpage data access method and device, equipment, medium and product thereof |
| CN116456021A (en) * | 2023-04-20 | 2023-07-18 | 成都赛力斯科技有限公司 | Page data request method and device, electronic equipment and readable storage medium |
Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102591963A (en) * | 2011-12-30 | 2012-07-18 | 奇智软件(北京)有限公司 | Method and device for controlling webpage content loading |
| CN104007990A (en) * | 2014-05-30 | 2014-08-27 | 北京金山网络科技有限公司 | Webpage loading method and browser |
| CN104038510A (en) * | 2013-03-04 | 2014-09-10 | 腾讯科技(深圳)有限公司 | IOS system transparent agent realization method and system |
| CN104572777A (en) * | 2013-10-28 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Webpage loading method and device based on UIWebView component |
| CN107203555A (en) * | 2016-03-17 | 2017-09-26 | 阿里巴巴集团控股有限公司 | Page loading processing method and device |
| CN108228818A (en) * | 2017-12-29 | 2018-06-29 | 网易(杭州)网络有限公司 | Web page resources loading method and device, electronic equipment and storage medium |
| CN108287839A (en) * | 2017-01-09 | 2018-07-17 | 阿里巴巴集团控股有限公司 | A kind of page loading method and equipment |
| CN109101564A (en) * | 2018-07-16 | 2018-12-28 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus and electronic equipment of page resource load simultaneously |
| CN110287432A (en) * | 2019-06-28 | 2019-09-27 | 北京金山安全软件有限公司 | Network information processing method and device and electronic equipment |
| CN110417919A (en) * | 2019-08-29 | 2019-11-05 | 网宿科技股份有限公司 | Method and device for traffic hijacking |
| CN110569078A (en) * | 2018-05-18 | 2019-12-13 | 广州腾讯科技有限公司 | Method and device for preloading webpage-level program |
-
2020
- 2020-02-17 CN CN202010097984.5A patent/CN111339461A/en active Pending
Patent Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102591963A (en) * | 2011-12-30 | 2012-07-18 | 奇智软件(北京)有限公司 | Method and device for controlling webpage content loading |
| CN104038510A (en) * | 2013-03-04 | 2014-09-10 | 腾讯科技(深圳)有限公司 | IOS system transparent agent realization method and system |
| CN104572777A (en) * | 2013-10-28 | 2015-04-29 | 腾讯科技(深圳)有限公司 | Webpage loading method and device based on UIWebView component |
| CN104007990A (en) * | 2014-05-30 | 2014-08-27 | 北京金山网络科技有限公司 | Webpage loading method and browser |
| CN107203555A (en) * | 2016-03-17 | 2017-09-26 | 阿里巴巴集团控股有限公司 | Page loading processing method and device |
| CN108287839A (en) * | 2017-01-09 | 2018-07-17 | 阿里巴巴集团控股有限公司 | A kind of page loading method and equipment |
| CN108228818A (en) * | 2017-12-29 | 2018-06-29 | 网易(杭州)网络有限公司 | Web page resources loading method and device, electronic equipment and storage medium |
| CN110569078A (en) * | 2018-05-18 | 2019-12-13 | 广州腾讯科技有限公司 | Method and device for preloading webpage-level program |
| CN109101564A (en) * | 2018-07-16 | 2018-12-28 | 阿里巴巴集团控股有限公司 | A kind of method, apparatus and electronic equipment of page resource load simultaneously |
| CN110287432A (en) * | 2019-06-28 | 2019-09-27 | 北京金山安全软件有限公司 | Network information processing method and device and electronic equipment |
| CN110417919A (en) * | 2019-08-29 | 2019-11-05 | 网宿科技股份有限公司 | Method and device for traffic hijacking |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112256989A (en) * | 2020-10-21 | 2021-01-22 | 平安科技(深圳)有限公司 | Offline package-based page loading method, device, terminal device and storage medium |
| CN115033141A (en) * | 2021-03-04 | 2022-09-09 | 腾讯科技(深圳)有限公司 | Video generation method and device |
| CN113094607A (en) * | 2021-04-08 | 2021-07-09 | 百度在线网络技术(北京)有限公司 | Method and device for acquiring local resources |
| CN113094607B (en) * | 2021-04-08 | 2024-04-19 | 百度在线网络技术(北京)有限公司 | Method and device for obtaining local resources |
| CN114065082A (en) * | 2021-11-30 | 2022-02-18 | 中国建设银行股份有限公司 | Web page resource caching method, device and system |
| CN115296915A (en) * | 2022-08-08 | 2022-11-04 | 广州华多网络科技有限公司 | Webpage data access method and device, equipment, medium and product thereof |
| CN115296915B (en) * | 2022-08-08 | 2023-07-18 | 广州华多网络科技有限公司 | Webpage data access method and device, equipment, medium and product thereof |
| CN116456021A (en) * | 2023-04-20 | 2023-07-18 | 成都赛力斯科技有限公司 | Page data request method and device, electronic equipment and readable storage medium |
| CN116456021B (en) * | 2023-04-20 | 2025-02-07 | 重庆赛力斯凤凰智创科技有限公司 | Page data request method, device, electronic device and readable storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11647096B2 (en) | Method and apparatus for automatically optimizing the loading of images in a cloud-based proxy service | |
| CN111339461A (en) | Page access method of application program and related product | |
| US10015226B2 (en) | Methods for making AJAX web applications bookmarkable and crawlable and devices thereof | |
| US10733259B2 (en) | Web page access method and apparatus | |
| TWI690812B (en) | Method, device and client for dynamic layout of page elements | |
| CN112559927B (en) | Webpage loading method and device | |
| WO2020199751A1 (en) | Method and apparatus for loading page picture, and electronic device | |
| US20140325323A1 (en) | Online video playing method and apparatus and computer readable medium | |
| US9141724B2 (en) | Transcoder hinting | |
| CN112115396A (en) | Webpage rendering method, device, equipment and storage medium | |
| CN108319708B (en) | Video playing method and device, storage medium and electronic equipment | |
| CN102065108A (en) | Method, wireless communication terminal and client browser for realizing pre-download | |
| CN111372115B (en) | Application program access method and device and communication system | |
| CN110020304A (en) | A method and device for loading a page | |
| CN107656768A (en) | Control the method and its system of page jump | |
| CN114528510A (en) | Webpage data processing method and device, electronic equipment and medium | |
| CN112269959A (en) | Control method, apparatus, readable medium and electronic device for displaying content | |
| US20170359434A1 (en) | Web caching with image and local storage | |
| KR20080100597A (en) | Mobile web data providing service system and method for blocking specific data | |
| CN106354792B (en) | Webpage display method and device | |
| CN108376090A (en) | Method, device, terminal and storage medium for operating web page pictures | |
| CN108062352A (en) | Webpage method for caching and processing and mobile terminal device and medium product | |
| CN113836458A (en) | Page loading method, apparatus, device and computer storage medium | |
| CN103793459A (en) | Webpage opening method and webpage opening device | |
| CN114428930A (en) | Data preloading method, device and electronic device based on H5 page |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |