What is webview

(*-*)浩
Release: 2019-08-03 09:45:06
Original
28461 people have browsed it

What is webview? What is the function? What does it have to do with browsers?

What is webview

Webview is a webkit-based engine that can parse DOM elements and display the controls of the html page. It interacts with the browser to display the page. The principles are the same, so you can think of it like a browser. (The chrome browser is also developed based on the webkit engine, and the Mozilla browser is developed based on the Gecko engine)

Android's Webview uses different webkit version kernels in low and high versions. After 4.4, it will be directly Used Chrome. (Recommended learning: web front-end video tutorial)

What is webview mainly used for? Or what kind of requirements will webview be used?

My personal understanding is that when an html page is displayed on a computer, it can be browsed by opening the page through a browser. However, at the mobile phone system level, it cannot be displayed without webview support. html page, so the function of webview is to use the mobile system to display the html interface

So it is mainly needed when loading html files on the mobile system

A native application The process of calling html page?

1. The native application loads the html page (there may be many ways to load the page, such as loading a locally written html file, or a file placed on the server)

2. After the loading is completed, the display is rendered through webview. If the system does not have a webview, the

2 step of rendering and displaying the html cannot be performed. In fact, the process of calling the html page by a native application has been completed, so the page is not only displayed, but also Interaction may also be required, and some methods need to be written here. For example, the buttons in the HTML interface need to call things native to the system (such as taking photos, system files, photo albums, etc.). The native end is responsible for maintaining the interface called by html, and then returns as needed (the native end acts as a server, and html acts as a client)

What are the benefits of using webview?

The native APP packages the page layout design and business code and then the user downloads, installs and uses it, while the webview displays the page by loading the html file. When the page layout or business logic needs to be updated, When changing, if it is a native APP, you need to modify the front-end content, upgrade the packaging, and re-release it to use the latest one.

The page through webview only needs to modify the html code or js file (if it is obtained from the server, as long as the new file deployment is completed), the user can use the updated version after refreshing it without downloading. Complete the upgrade through installation.

The above is the detailed content of What is webview. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!