Webpage optimization method for WKWebView component

A web page optimization and component technology, applied in the Internet field, can solve problems such as usage scenario limitations, limited web page capabilities, and optimization strategy failures, and achieve the effects of improving network security performance, saving bandwidth usage, and improving loading speed.

Inactive Publication Date: 2020-12-01
上海洋漪信息技术有限公司 +1
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although WKWebView has many advantages, compared with the original UIWebView component, it is more closed, and the original optimization strategies such as access interception and cache optimization have been invalidated.
[0003] The WKWebView component is limited by the capabilities of the webpage, and most of the usage scenarios are limited to ordinary content display. It lacks support for the native capabilities of the smartphone operating system, such as positioning, accessing the camera, and calling. The functions that can be realized cannot be compared with smartphones. Compared to the native development of the operating system
[0004] In addition, the issue of network security is a very important link in web development. Although the commonly used https protocol can effectively improve the encryption and anti-peeping of network messages, the server cannot verify the authenticity of its messages, and cannot prevent forgery and duplication of request messages. malicious attacks on servers
At the same time, due to the openness of the JavaScript language, it is impossible to perform sensitive and complex encryption processing on messages at the JavaScript language level
[0005] The Webp format is a new image display format introduced by Google. Compared with commonly used jpg, png and other formats, it has a higher compression ratio and can significantly reduce bandwidth consumption. However, the WKWebView component cannot directly support webP images in web pages. show

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Webpage optimization method for WKWebView component
  • Webpage optimization method for WKWebView component

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] The web page optimization method for the WKWebView component of the present invention comprises the following steps:

[0020] Step 1. Since the domain name resolution and cache resources of all WKWebView components in the APP are shared, when the APP is started, a hidden WKWebView component is first loaded, and the WKWebView component silently loads a full-time web page address for resource management. Pre-parse and pre-connect, and return the public resource library required by the APP at the same time. The WKWebView component parses and accesses the returned public resource library, and automatically caches the resources required by the APP in the shared space of WKWebView for subsequent web page access.

[0021] Step 2. Communication between the native layer of the smartphone operating system and the webpage layer is realized through the jsContext component, and two global pipeline queues are applied for in the jsContext component, which are respectively used for two-...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a webpage optimization method for a WKWebView component, and the method comprises the steps: carrying out the pre-analysis and pre-connection of a domain name through the WKWebView component when an APP is started, and caching resources needed by the APP to a shared space for subsequent webpage access; applying for two global pipeline queues in a jsContext component betweena native layer and a webpage layer, which are respectively used for bidirectional access between the webpage layer and the native layer, so as to realize expansion of native capability; encrypting each message in the native layer and decrypting each massage at a server side, so that the network security performance of a webpage is improved. The native layer is accessed to a webp picture analysislibrary, a picture request is transmitted to the native layer through a global pipeline, and the native layer processes the picture request and returns a picture cache address to the webpage layer, sothat webpage display of a webp picture is realized. According to the method, the webpage loading speed is increased, the network security is improved, the capability of accessing a native operating system by a webpage is improved, and the support for a webp format is increased.

Description

technical field [0001] The invention relates to the field of Internet technologies, and in particular, to a web page optimization method for a WKWebView component. Background technique [0002] Apple has launched a new framework WebKit after iOS8, which provides a WKWebView component that replaces the original UIWebView. This component has the advantages of high stability, low memory usage, and fast rendering speed. It is an official webpage display component recommended by Apple. Although WKWebView has many advantages, it is more closed than the original UIWebView component, and the original optimization strategies such as access interception and cache optimization have all failed. [0003] The WKWebView component is limited by the capabilities of web pages, and most of the usage scenarios are limited to ordinary content display. The native capabilities of the smartphone operating system, such as positioning, accessing the camera, calling, etc., are extremely lacking, and t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/958G06F16/9535G06F9/445H04L9/06H04L9/32
CPCG06F9/44526G06F16/9535G06F16/958H04L9/0643H04L9/3297
Inventor 曹彦亭
Owner 上海洋漪信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products