«

»

Jul
04
2013

How UIWebview Temp Files/Cookies Storage Managed on iOS Hybrid Apps

UIWebview Hybrid AppsUIWebview is a popular option for developing hybrid apps in iOS. It allows embedding of HTML5 based or similar web apps into a native iOS container so the cross platform development and maintenance simplified to some extent.

So a hybrid app can include web browser (or web pages) into it. But the question is, how the where the temporary internet files/cookies and other local storage data would go into? Would clearing the mobile safari browser cache and cookies would clear the data web pages used/browsed through the hybrid apps as well?

To answer the question, we must understand how the UIWebview works. UIWebview does not embed the safari web browser (of iOS) itself. In fact it cannot match the performance of safari web browser (safari uses Nitro javascript engine to execute javascript code much faster – as per apple). It is a different component (a class) from the mobile safari browser.

So if we clear the mobile safari’s temp files/cookies or local storage data (Settings > Safari > Clear Cookies and Data) that will not impact data produced and stored through hybrid apps.

iOS Hybrid web apps cache/cookies management

Which makes sense, because the storage of apps stays with the apps and the mobile safari’s storage through sites does not interfere with them. Any cache/cookies/local storage generated by the app stored into apps storage and not going to mix with mobile safari’s storage (files generated from internet sites)

So how the cache/cookies from the hybrid web apps will be cleared, if there is such necessity the app developer should take care of it and include necessary options within the app to clear them.

Other alternative option would be deleting the app entirely and reinstall (not ideal) but deleting app would delete everything with it.

 

WebStorage and other temp files stored as part of app storage

WebStorage and other temp files stored as part of app storage

??

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>