liquidx / webviewscreensaver

Mac OS X Screen Saver powered by a Web View
Apache License 2.0
1.17k stars 138 forks source link

Disk cache for webview needs to be manually cleared #20

Closed liquidx closed 4 years ago

liquidx commented 8 years ago

Looks like the default behavior of WKWebView is the cache to disk, which is not ideal if you're using it to view image galleries and so forth. It doesn't seem like it clears the disk cache either.

WebViewScreenSaver may need to switch off disk caching completely or figure out a way to stop that from happening.

https://developer.apple.com/library/mac/documentation/WebKit/Reference/WKWebViewConfiguration_Ref/index.html#//apple_ref/occ/instp/WKWebViewConfiguration/websiteDataStore

r14n commented 6 years ago

How can one manually clear the cache while we wait for this?

Edit: I was able to clear the cache (on macOS Sierra) by going to ~/Library/Caches and searching/deleting webview/screensaver related files found within that folder.

Roza2011 commented 4 years ago

After running Webviewscreensaver on my Mac OS 10.12.6 without a problem for a long time I am now having an issue. The Nightscout page can not be loaded when selected as screensaver. It shows the Nightscout loading page with message "connecting to server" and it freezes there.Previously that was not the case. I have tried uninstalling the app and clearing the cache from Safari and Chrome. I have also searched ~/Library/Caches and delated all found related files however I am still missing something since after reinstalling, the app picks up the Nightscout page address on its own. This mean I did not successfully cleared all of the cache. Any help how to clear the cache?

agologan commented 4 years ago

We have a button now (v2.1) in the options panel to clear cache and other data. Check it out and get back to us.

Roza2011 commented 4 years ago

We have a button now (v2.1) in the options panel to clear cache and other data. Check it out and get back to us.

Many thanks for your reply. I have tried v2.1 and have clicked button to clear the cache and history however still my problem is there. Nothing has apparently changed with my issue with new version. If I set my nightscout page clock view as a screensaver then webviewscreensaver displays it without any problem, however if I set my default nightscout home page as a screen saver then It shows the Nightscout loading page with message "connecting to server" and it freezes there. How to reset or clear configuration tied to the macOS defaults system? I hope I am making sense with my problem and the question. Thank you for your help.

agologan commented 4 years ago

In regards to your specific use-case, please see my reply in #62