diff --git a/server/dist/index.html b/server/dist/index.html index 991a456..5c09fb5 100644 --- a/server/dist/index.html +++ b/server/dist/index.html @@ -7,6 +7,9 @@ + + + Smart Home diff --git a/webclient/android/app/src/main/java/com/gnexus/shserv/MainActivity.java b/webclient/android/app/src/main/java/com/gnexus/shserv/MainActivity.java index 5a250b4..a4803a9 100644 --- a/webclient/android/app/src/main/java/com/gnexus/shserv/MainActivity.java +++ b/webclient/android/app/src/main/java/com/gnexus/shserv/MainActivity.java @@ -7,6 +7,7 @@ import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; +import android.webkit.WebView; import androidx.core.view.ViewCompat; import androidx.core.view.WindowCompat; import com.getcapacitor.BridgeActivity; @@ -32,6 +33,15 @@ super.onCreate(savedInstanceState); + // When loading from a remote server, clear WebView cache so updated + // JS/CSS assets are always fetched fresh instead of served from disk. + if (serverUrl != null && !serverUrl.isEmpty()) { + WebView webView = (WebView) findViewById(com.getcapacitor.android.R.id.webview); + if (webView != null) { + webView.clearCache(true); + } + } + // Prevent edge-to-edge: content must NOT draw behind status bar Window window = getWindow(); WindowCompat.setDecorFitsSystemWindows(window, true); diff --git a/webclient/index.html b/webclient/index.html index cb6d84a..6c5888d 100644 --- a/webclient/index.html +++ b/webclient/index.html @@ -7,6 +7,9 @@ + + + Smart Home