summaryrefslogtreecommitdiff
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-08-28 17:16:54 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-08-28 17:16:54 -0400
commitca0e7da014bf885d5f2acc887667368475f55520 (patch)
tree57bb51d132b4f81840f3ec44eba22addcf822f52 /lib/js
parentd91328bc0c51c399b2a6926ba04cead7bccc67da (diff)
Gentle handling of back-button returns to pages with stale message-passing credentials
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index f0d9b693..42660bf0 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -736,6 +736,7 @@ var client_id = null;
var client_pass = 0;
var url_prefix = "/";
var timeout = 60;
+var isPost = false;
function getXHR(uri)
{
@@ -909,6 +910,15 @@ function listener() {
return;
var lines = text.split("\n");
+ if (lines.length == 1 && lines[0] == "R") {
+ if (isPost)
+ history.back();
+ else
+ location.reload();
+
+ return;
+ }
+
if (lines.length < 2) {
discon();
return;