From ea037aa944947f496d6cdfca3529970ce6c14ba5 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 26 Aug 2019 11:58:10 -0700 Subject: [PATCH] javascript: Don't resubmit when refreshing the page This was not caught earlier because the problem was masked by turbolinks usage. Tests: - Install an app and see the page refreshing. - Run manual update and see the page refreshing. - Update Tor configuration and see the page refreshing. - Run diagnostics from the diagnostics module and see the page refreshing. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- static/themes/default/js/refresh.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/themes/default/js/refresh.js b/static/themes/default/js/refresh.js index ab1621417..8766ffb36 100644 --- a/static/themes/default/js/refresh.js +++ b/static/themes/default/js/refresh.js @@ -28,7 +28,8 @@ function sleep(ms) { // Refresh the page once in n seconds async function refresh(ms) { await sleep(3000); - window.location.reload(); + // Refresh the page without resubmitting the POST data. + window.location = window.location.href; } refresh();