Having a local HTML folder, you can use the fallback mode of WebViewGold. This mode uses an HTML folder if the user is offline and uses a remote URL he/she is online. Set “offlinelocalhtmlswitch” to “true” in Config.swift (iOS) and/or “FALLBACK_USE_LOCAL_HTML_FOLDER_IF_OFFLINE” to “true” in Config.java (Android). However, on iOS, you may need to eliminate the subfolders in your “local-www” folder (e.g., “js” and “CSS”) and put all the files they contain into the main folder (“local-www”). A search & replace program can help adjust the HTML file path references fast and uncomplicatedly.
- Knowledge Base
- WebViewGold for Android
- How to use the fallback mode of WebViewGold? How to display an HTML folder if the user is offline and display a remote URL if the user is online in WebView app?
Article sections
Related Articles
- How to Get 12 or 20 Google Play Store Testers easily
- Is Your WebViewGold App Ready for Google Play’s 16 KB Requirement?
- How to integrate Pushwoosh in WebView-based iOS and Android apps?
- Fixing “white page” CDN issues in iOS & Android WebViews with a workaround
- How do I set up RevenueCat for In-App Purchases / In-App Subscriptions in WKWebView (iOS) or WebView (Android)?
- How to use GitHub for smart upgrading of WebViewGold app template?
- How does the native footer in iOS WebView looks like?
- What should we add/modify in our Privacy Policy / Terms & Conditions if we deploy WebView mobile apps?