commit d3d3fd527e258bca8a83b7c16f395d68e429b520
parent e8ad15f7d84886e3ece62007d0e4a5b9db4a79c4
Author: knutsen <samuel@knutsen.co>
Date: Fri, 16 Jul 2021 18:26:58 +0100
Window didn't wait for request to finish before reloading.
Firefox didn't wait, other browsers did.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/templates/guestbook.html b/templates/guestbook.html
@@ -157,7 +157,8 @@
};
req.send(formData);
- window.location.reload();
+ req.addEventListener('load',
+ window.location.reload.bind(window.location));
}, false);
</script>