We want to show website using URL first and once its loaded how can we save data in cache or cookies so that afterwards even user goes offline it will load form that?
some solution we came across are:
- WKWebViewConfiguration().websiteDataTypes = [WKWebsiteDataTypeOfflineWebApplicationCache] - tho this methods does not work anymore
- can we save websites data locally (may be download its content - how?)
some ref: https://stackoverflow.com/a/53512299
Please check the below code for fetching and saving the website data
// Function to save data locally
To fetch the saved data you can use below mentioned code