From 90d33e1fa97be3dfd4f7908979a31497873101b1 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 30 Jun 2020 00:07:30 -0500 Subject: [PATCH] Force reload on form submission On some browsers, submitting the form doesn't actually change the displayed program because of caching. This should ensure that doesn't happen. --- public/js/judging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/judging.js b/public/js/judging.js index 164e598..8f5ba0c 100644 --- a/public/js/judging.js +++ b/public/js/judging.js @@ -148,7 +148,7 @@ let submitEvaluation = (e) => { delete body[""]; request("post", "/api/internal/judging/submit", body, (data) => { if (!data.error) { - window.setTimeout(() => window.location.reload(), 1000); + window.setTimeout(() => window.location.reload(true), 1000); } else { alert(data.error.message); } @@ -160,7 +160,7 @@ let flagEntry = (id) => { let body = {entry_id: id}; request("put", "/api/internal/entries/flag", body, (data) => { if (!data.error) { - window.setTimeout(() => window.location.reload(), 1000); + window.setTimeout(() => window.location.reload(true), 1000); } else { alert(data.error.message); }