Chapter 11. The Native Side of the Web
The web is not just about browsers today. We’ve already seen during this book that a big percentage of users are browsing the web from native apps that are not marketed as browsers, such as Facebook and Twitter, or using web views such as Firefox and Chrome on iOS.
A lot of web content is executed inside native apps, to show rich content or to create hybrid or native web apps, such as Apache Cordova (PhoneGap) apps.
In this chapter, we will talk about the situations that might affect performance inside web views, such as using old versions or printing solutions.
The first thing to mention is that most of the techniques that we have seen for browsers will apply in web views too (or at least they won’t harm performance if they are ignored).
Note
Most modern web views allow you to attach remote inspectors and use all the debugging techniques we’ve already mentioned for websites.
Web Views on iOS
If you are using web views on iOS, you will first want to upgrade to WKWebView (as mentioned in Chapter 1), because it has better performance than UIWeb View, and then apply some tricks to improve the user’s perception of the experience.
Goodbye UIWebView
From iOS 2.0, UIWebView has been the web view control available in the UIKit framework. Starting with iOS 9, we can fully use the new WKWebView in the WebKit framework to load web or local content.
UIWebView is deprecated, and unless you still need to support users on iOS 7 and/or iOS 8 (for local ...
Get High Performance Mobile Web now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.