From 0bad0849c194b623c16caa0651d42182cda1354a Mon Sep 17 00:00:00 2001 From: Alan Savage <3028205+asavageiv@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:28:18 -0700 Subject: [PATCH] Avoid `Resend` popups on Firefox on start/stop containers Use `location.reload(true)` instead of `reload` or `reload(1)` to ensure we use a GET request. See also: https://stackoverflow.com/a/41122753 https://developer.mozilla.org/en-US/docs/Web/API/Location/reload#forceget Fixes #7850 Signed-off-by: Alan Savage <3028205+asavageiv@users.noreply.github.com> --- php/public/automatic_reload.js | 2 +- php/public/forms.js | 6 +++--- php/templates/containers.twig | 2 +- php/templates/layout.twig | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php/public/automatic_reload.js b/php/public/automatic_reload.js index 0381345d..20a2bc32 100644 --- a/php/public/automatic_reload.js +++ b/php/public/automatic_reload.js @@ -9,7 +9,7 @@ window.addEventListener("load", function(event) { // set timeout for reload setTimeout(function(){ - window.location.reload(1); + window.location.reload(true); }, 5000); } else { window.addEventListener("beforeunload", function() { diff --git a/php/public/forms.js b/php/public/forms.js index 6b982b0d..46cde081 100644 --- a/php/public/forms.js +++ b/php/public/forms.js @@ -36,11 +36,11 @@ function showPassword(id) { showError("Server error. Please check the mastercontainer logs for details. This page will reload after 10s automatically. Then you can check the mastercontainer logs."); // Reload after 10s since it is expected that the updated view is shown (e.g. after starting containers) setTimeout(function(){ - window.location.reload(1); + window.location.reload(true); }, 10000); } else { // If the responose is not one of the above, we should reload to show the latest content - window.location.reload(1); + window.location.reload(true); } } @@ -84,7 +84,7 @@ function showPassword(id) { document.getElementById('overlay-log')?.classList.add('visible'); // Reload the page after the response was fully loaded into the iframe. document.querySelector('iframe[name="overlay-log"]').addEventListener('load', () => { - location.reload(); + location.reload(true); }); }; } diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 169c5fb5..73c3446d 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -635,7 +635,7 @@ {% endif %} {% if isApacheStarting == true or is_backup_container_running == true or isWatchtowerRunning == true or is_daily_backup_running == true %} - + {% else %} {% endif %} diff --git a/php/templates/layout.twig b/php/templates/layout.twig index 39f8f45b..ab3095c4 100644 --- a/php/templates/layout.twig +++ b/php/templates/layout.twig @@ -3,7 +3,7 @@ AIO - +