Commit 5e505e2b authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Set window.onbeforeunload to force refresh when "Back" is pressed

Reference:
http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript
parent eb398ddc
......@@ -87,7 +87,9 @@ module Make (S : AUTH_SERVICES) : TEMPLATES = struct
let base ~title ~login_box ~content =
Lwt.return (html ~a:[a_dir `Ltr; a_xml_lang "en"]
(head (Eliom_content.Html5.F.title (pcdata title)) [])
(head (Eliom_content.Html5.F.title (pcdata title)) [
script (pcdata "window.onbeforeunload = function () {};");
])
(body [
div ~a:[a_id "header"] [
div [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment