diff options
author | Ian C <ianc@noddybox.co.uk> | 2018-07-24 13:12:41 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2018-07-24 13:12:41 +0000 |
commit | ba923b884a2678b5100e6defd07c9b7adb48bf30 (patch) | |
tree | e031b04db1ccbd1ef11b40f7607dc6e13c1f8b14 | |
parent | 44131e56b84d636f6a85e64b965d0a04faadc2d0 (diff) |
Don't know if it matters, but tried to stop chacheing.
-rw-r--r-- | www/add.php | 3 | ||||
-rw-r--r-- | www/edit.php | 3 | ||||
-rw-r--r-- | www/get.php | 3 | ||||
-rw-r--r-- | www/index.html | 3 | ||||
-rw-r--r-- | www/reorder.php | 3 | ||||
-rw-r--r-- | www/scripts/main.js | 12 |
6 files changed, 18 insertions, 9 deletions
diff --git a/www/add.php b/www/add.php index 517d724..2ecff7b 100644 --- a/www/add.php +++ b/www/add.php @@ -57,6 +57,9 @@ catch(PDOException $e) $result["error"] = "DB error:" . $e->getMessage(); } +header("Cache-Control: no-cache, no-store, must-revalidate"); +header("Pragma: no-cache"); +header("Expires: 0"); header("Content-type:application/json"); echo json_encode($result); diff --git a/www/edit.php b/www/edit.php index 7bcd604..890d042 100644 --- a/www/edit.php +++ b/www/edit.php @@ -54,6 +54,9 @@ catch(PDOException $e) $result["error"] = "DB error:" . $e->getMessage(); } +header("Cache-Control: no-cache, no-store, must-revalidate"); +header("Pragma: no-cache"); +header("Expires: 0"); header("Content-type:application/json"); echo json_encode($result); diff --git a/www/get.php b/www/get.php index c41fafc..a4e1f2a 100644 --- a/www/get.php +++ b/www/get.php @@ -49,6 +49,9 @@ catch(PDOException $e) $result["error"] = "DB error:" . $e->getMessage(); } +header("Cache-Control: no-cache, no-store, must-revalidate"); +header("Pragma: no-cache"); +header("Expires: 0"); header("Content-type:application/json"); echo json_encode($result); diff --git a/www/index.html b/www/index.html index a52d173..3c585a0 100644 --- a/www/index.html +++ b/www/index.html @@ -1,6 +1,9 @@ <!DOCTYPE html> <html lang="en-GB"> <head> +<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> +<meta http-equiv="Pragma" content="no-cache" /> +<meta http-equiv="Expires" content="0" /> <meta charset="utf-8"> <title>PassMan</title> <link rel="shortcut icon" href="favicon.png" type="image/png"/> diff --git a/www/reorder.php b/www/reorder.php index 375ee62..535e0b6 100644 --- a/www/reorder.php +++ b/www/reorder.php @@ -69,6 +69,9 @@ catch(PDOException $e) $result["error"] = "DB error:" . $e->getMessage(); } +header("Cache-Control: no-cache, no-store, must-revalidate"); +header("Pragma: no-cache"); +header("Expires: 0"); header("Content-type:application/json"); echo json_encode($result); diff --git a/www/scripts/main.js b/www/scripts/main.js index d989803..dc7e001 100644 --- a/www/scripts/main.js +++ b/www/scripts/main.js @@ -48,17 +48,11 @@ function WebRequest(url, func, args) { var f; + url += "?t=" + Math.random(); + for(f = 0; f < args.length; f += 2) { - if (f == 0) - { - url += "?"; - } - else - { - url += "&"; - } - + url += "&"; url += args[f] + "="; url += encodeURIComponent(args[f+1]); } |