no-cache fixes for safari
This commit is contained in:
parent
f7c390b878
commit
dc56b3b7da
|
@ -1,11 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
require_once "sessions.php";
|
require_once "sessions.php";
|
||||||
require_once "modules/backend-rpc.php";
|
require_once "modules/backend-rpc.php";
|
||||||
|
|
||||||
header("Cache-Control: no-cache, max-age=0, must-revalidate");
|
|
||||||
header("Pragma: no-cache");
|
|
||||||
header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
|
|
||||||
|
|
||||||
/* if ($_GET["debug"]) {
|
/* if ($_GET["debug"]) {
|
||||||
define('DEFAULT_ERROR_LEVEL', E_ALL);
|
define('DEFAULT_ERROR_LEVEL', E_ALL);
|
||||||
} else {
|
} else {
|
||||||
|
@ -23,6 +20,8 @@
|
||||||
require_once "db-prefs.php";
|
require_once "db-prefs.php";
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
|
no_cache_incantation();
|
||||||
|
|
||||||
$script_started = getmicrotime();
|
$script_started = getmicrotime();
|
||||||
|
|
||||||
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
|
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
|
||||||
|
|
|
@ -3162,4 +3162,13 @@
|
||||||
require_once "login_form.php";
|
require_once "login_form.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// from http://developer.apple.com/internet/safari/faq.html
|
||||||
|
function no_cache_incantation() {
|
||||||
|
header("Expires: Mon, 22 Dec 1980 00:00:00 GMT"); // Happy birthday to me :)
|
||||||
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); // HTTP/1.1
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache"); // HTTP/1.0
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
|
|
||||||
$dt_add = get_script_dt_add();
|
$dt_add = get_script_dt_add();
|
||||||
|
|
||||||
header("Cache-Control: no-cache, max-age=0, must-revalidate");
|
no_cache_incantation();
|
||||||
header("Pragma: no-cache");
|
|
||||||
header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
|
|
||||||
$dt_add = get_script_dt_add();
|
$dt_add = get_script_dt_add();
|
||||||
|
|
||||||
header("Cache-Control: no-cache, max-age=0, must-revalidate");
|
no_cache_incantation();
|
||||||
header("Pragma: no-cache");
|
|
||||||
header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
|
Loading…
Reference in New Issue