Webview and CSS how to verify what is compatible?

Asked

Viewed 76 times

1

I’m trying to make an application with Webview for android and iOS (different applications for each system), and would like to know how the Internet access window reads CSS and checks its compatibility. Or whatever "Browser Support" that I have to check to know that my CSS options are accepted.

I assume that Webview on android is the equivalent of using a browser Chrome and so support the same CSS, and that iOS is the equivalent of a browser Safari and which supports its CSS. This is correct?

1 answer

1


About Chrome and Android Browser I can’t fully tell you, but if there is one Chrome specific for Android, quite possibly is because it is different from native Android Browser.

About Safari yes I can say that there are differences, and most of them involve performance and not only support for CSS and prefix vendor.

Safari Mobile is optimized to work on low-resource hardware devices, meaning it’s optimized for devices that don’t have the same processing power as a desktop machine.

Because Apple wants to optimize UX and iPhone performance it limits some property that consumes a lot of machine resources. A "classic" example of this is that Safari Mobile does not allow the property background-attachment: fixed;, because it is very expensive for the browser and impairs the performance of the mobile. You can read more here Background problem with Iphone 6, 7 and 8

I believe that Android Browser tb has some of these tricks, Chrome Android I believe is a more faithful reproduction than Chrome Desktop, besides having functions more inherent to the mobile environment as voice navigation, save to view offline and some compression managers and data caching. I even believe that the manufacturing itself as Asus, Samsung, etc., may limit or not resources of the native Browser, the own https://caniuse.com/ mentions this in the browser description when describing some CSS property

Support Listed is for the Android core; it should be noted that Many hardware vendors (Samsung, HTC, etc.) use Altered version of their default browser

Translating: "The support listed is for the core of Android; it should be noted that many hardware vendors (Samsung, HTC, etc.) use altered versions of their default browser"

  • So how can iOS webview use what they don’t allow in the mobile browser? Like the ``background-Attachment: Fixed example;````?

  • 1

    @Pbras can, but will not work because the iOS Safari Browser will not recognize the property. This is just an example that I know doesn’t work, but I don’t know there are other properties like this documented, or if Apple talks openly about it.... Until pq both Apple and Google are very obscure as to limit user resources to force some behavior like migration and platform or the purchase of a new device

Browser other questions tagged

You are not signed in. Login or sign up in order to post.