Article sections

    Your app built with WebViewGold will save all cookies (including login and session cookies) until they expire (this is defined by your server/your site)! Often cookie lifetime was set to β€œUntil browser session ends” by accident. πŸ™‚ If you use WordPress, you can try installing this plugin that allows you to change the WordPress default session timeout value:Β 


    Our suggestions for cookie lifetime debugging:

    Please install Google Chrome on your computer (or delete the cookies + cache if you already use this browser), install the plugin, and log in to your website. You can then see the cookie lifetime that your server or web code specifies in the plugin view. Often no expiration date is given, but then the cookie is not valid forever, but only as long as the browser session is running: For Chrome or desktop browsers, this can be very long; for apps, it is the restart. The solution is then to add to your cookie that it should have a specific lifetime.

    Alternatively, you can use as the mobile WebView URL to test whether this page can save cookies.


    Some more ideas:

    – Make sure that you have deactivated the deletecache option in Config.swift (iOS) or the CLEAR_CACHE_ON_STARTUP option in (Android).

    – Check if adding a slash (β€ž/β€ž) to the full WebView URL (iOS: webviewurl variable, Android: HOME_URL variable) makes a difference.

    – Android-only: Do you use any Cleaner / Turbo Booster / Speed / Anti-Virus /… apps?

    – Android-only: Which version of WebView is installed on the device (see Apps list in Settings app)?

    – Android-only: Which version of Google Chrome is installed on the device (see Apps list in Settings app)?

    – Android-only: Set MANUAL_COOKIE_SYNC to true in if you require cookies to be synced under every 30 seconds or if something cookie-related does not work otherwise. Then, you can set COOKIE_SYNC_TIME (how often the cookies should sync with the app in milliseconds ) and MANUAL_COOKIE_SYNC_TRIGGERS (URL prefixes you want to use the Manual Cookie Sync tool on; see documentation), as well.

    – PHP-based web apps: Can you improve the cookie session lifetime on your server using session.cookie_lifetime (see e.g., Example PHP code (set at the very top of the PHP script):

    $lifetime = 86400;


    in WebViewGold for AndroidWebViewGold for iOS