core/ui: no-cache html, force back

This commit is contained in:
Caleb Doxsey 2024-09-04 16:30:48 -06:00
parent c058b8a99c
commit 07d63cbde1
2 changed files with 7 additions and 2 deletions

View file

@ -52,7 +52,8 @@ func ServePage(w http.ResponseWriter, r *http.Request, page, title string, data
return err
}
http.ServeContent(w, r, "index.html", time.Now(), bytes.NewReader(bs))
w.Header().Set("Cache-Control", "no-cache, must-revalidate")
http.ServeContent(w, r, "index.html", time.Time{}, bytes.NewReader(bs))
return nil
}

View file

@ -17,8 +17,12 @@ type SignOutConfirmPageProps = {
const SignOutConfirmPage: FC<SignOutConfirmPageProps> = ({ data }) => {
function handleClickCancel(evt: React.MouseEvent) {
evt.preventDefault();
if (document.referrer) {
location.href = document.referrer;
} else {
history.back();
}
}
function handleClickLogout(evt: React.MouseEvent) {
evt.preventDefault();