From 517a615d119453ae896bcf7d02362c9d9b032ca5 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Mon, 20 Apr 2026 17:34:23 +0000 Subject: [PATCH] fix: forza no-cache per JS/CSS + WebView LOAD_NO_CACHE - .htaccess: aggiunge Cache-Control no-cache/no-store per .js/.css - Kiosk Kotlin: aggiunge cacheMode=LOAD_NO_CACHE al WebView - Il pulsante refresh del kiosk ora carica sempre l'ultima versione --- .htaccess | 7 +++++++ .../kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt | 1 + 2 files changed, 8 insertions(+) diff --git a/.htaccess b/.htaccess index 67a8114..342fffe 100644 --- a/.htaccess +++ b/.htaccess @@ -9,3 +9,10 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^api/(.*)$ api/index.php?action=$1&%{QUERY_STRING} [L,QSA] AddType application/x-x509-ca-cert .crt + +# Prevent caching of JS/CSS so kiosk always gets fresh files + + Header set Cache-Control "no-cache, no-store, must-revalidate" + Header set Pragma "no-cache" + Header set Expires "0" + diff --git a/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt b/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt index b373389..d6ccb1a 100644 --- a/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt +++ b/evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt @@ -434,6 +434,7 @@ class KioskActivity : AppCompatActivity() { settings.mediaPlaybackRequiresUserGesture = false settings.allowFileAccess = true settings.mixedContentMode = android.webkit.WebSettings.MIXED_CONTENT_ALWAYS_ALLOW + settings.cacheMode = android.webkit.WebSettings.LOAD_NO_CACHE webView.webViewClient = object : WebViewClient() { override fun onReceivedSslError(