Caching websites for offline use with SFSafariViewController
NickName:NikxDa Ask DateTime:2019-01-20T13:00:42

Caching websites for offline use with SFSafariViewController

I am using the following code to display a website in my app.

let webVC = SFSafariViewController(url: myUrl)
present(webVC, animated: true)

Now, I want to add offline reading. I know that iOS has a reading list, which apparently caches articles for offline use, but I could not find anything related in either the documentation for SFSafariViewController or elsewhere.

The only similar post I could find was this one (Swift iOS Cache WKWebView content for offline view) although it depends on WKWebView and writing a custom web archive exporter.

There must be a better way to achieve offline capabilities for SFSafariViewController, considering that it is newer and the recommended in-app method, and that Safari itself utilises an offline-mode for the iOS reading list. Any help?

Copyright Notice:Content Author:「NikxDa」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54273719/caching-websites-for-offline-use-with-sfsafariviewcontroller

More about “Caching websites for offline use with SFSafariViewController” related questions

Caching websites for offline use with SFSafariViewController

I am using the following code to display a website in my app. let webVC = SFSafariViewController(url: myUrl) present(webVC, animated: true) Now, I want to add offline reading. I know that iOS ha...

Show Detail

IOS Offline Caching WebView content

I need to load an url in a WebView and download the whole content of the website (documents, images, css, etc) to be able to work offline. I built an app 4-5 years ago (targeting iOS 7.0) using t...

Show Detail

How can we use offline caching in iOS development?

I'm building an article reading iOS app. Articles load by JSON data and app containing UITableView with images and text. I want to use offline caching to increase the performance of app. What is...

Show Detail

How to save websites for offline use in JavaScript

Most browsers have an option to save websites for offline use. The layout of the webpage usually is preserved just fine when one selects to save the complete webpage. Is there a way to invoke this

Show Detail

Multiple IIS websites with same caching

I would like to know how I can implement caching for multiple IIS websites. I have different applications which use the same queries I cached. I made a simple cache service that uses System.Web.Ca...

Show Detail

Azure WebSites and Distributed caching

What is the right way to implement azure websites (not webroles) that use distributed caching? Does Azure have anything built in or a 3-rd party has to be involved? Edit: I have been struggling w...

Show Detail

Retrofit OKHTTP Offline caching not working

I read dozens of tutorial and Stackoverflow answers to my problem but nothing is working for me! Also, most of them are old so probably OKHTTP changed somehow. All I want is to enable offline cach...

Show Detail

Is it possible to use app_offline with Azure Websites?

I connected to my Azure Website (reserved) via FTP this evening and uploaded an app_offline.htm file (tried HTML as well) but it isn't causing the application to stop as an app_offline.htm file wou...

Show Detail

Open website with SFSafariViewController from UITextView auto detected link

I have a UIViewController with a UITextView that auto-detects hyperlinks in its text. It works properly, but I'd to use SFSafariViewController to open the links so I stay "inside" my app, rather than

Show Detail

Caching python web requests for offline use

Is there a way to "cache" the requests I make with the python "requests" module in a way that even if I go offline the module still returns the webpage as if I was online? How can I achieve something

Show Detail