Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

differences between uiwebview and mobile safari [closed]

Have looked far and wide for info and have found no definitive list. Please add your observations. I'm sure it will come in handy to all.

like image 585
How2iphone Avatar asked Aug 16 '10 19:08

How2iphone


People also ask

What is Mobile Safari UIWebView?

It means that your web site was viewed using the UIWebView functionality on an iOS device (iPhone, iPad, iPod Touch). The UIWebView is different from the ordinary Safari browser, as it is not a stand-alone browser, but merely browser functionality that is embedded in a third party app.

What is Mobile Safari?

Safari is the best way to experience the internet on all your Apple devices. It brings robust customization options, powerful privacy protections, and industry-leading battery life — so you can browse how you like, when you like. And when it comes to speed, it's the world's fastest browser.

Is WKWebView same as Safari?

WKWebView - This view allows developers to embed web content in your app. You can think of WKWebView as a stripped-down version of Safari. It is responsible to load a URL request and display the web content. WKWebView has the benefit of the Nitro JavaScript engine and offers more features.

Which browser is used in iOS Webview?

Which browser iOS use in their webview? Safari browser installed in iOS & webview browser (if safari) are same or there are difference?


2 Answers

It doesn't have the Nitro Javascript engine. This makes executing Javascript much slower in UIWebView compared to Safari.

http://www.tuaw.com/2011/03/18/apple-confirms-some-webkit-optimizations-unavailable-to-ios-apps/

http://ariya.ofilabs.com/2012/06/nitro-javascriptcore-and-jit.html

like image 186
kioopi Avatar answered Oct 04 '22 15:10

kioopi


One thing I found, to my temporary sorrow is that UIWebView is a bit more strict while setting style values through JS. So say in mobile safari

element.style.width = 300;  

will work just fine, but in UIWebView you must set the value as

element.style.width = 300 + "px"; 

There are other differences which I'm discovering slowly. I'll update this as I do.

like image 38
SpeedySan Avatar answered Oct 04 '22 15:10

SpeedySan