Don't cache. No, really. Hat tip: Kimmo Suominen.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-19 18:43:45 +00:00
parent 0b090524bc
commit 7727b00596
4 changed files with 12 additions and 4 deletions

View File

@ -4,6 +4,10 @@ require_once(ABSPATH . 'wp-includes/wp-l10n.php');
require_once(ABSPATH . 'wp-admin/admin-functions.php');
auth_redirect();
header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
$dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories");
foreach ($dogs as $catt) {

View File

@ -38,7 +38,7 @@ setcookie('comment_author_url_' . COOKIEHASH, stripslashes($url), time() + 30000
header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
$location = get_permalink($comment_post_ID);

View File

@ -1560,10 +1560,10 @@ function auth_redirect() {
// Checks if a user is logged in, if not redirects them to the login page
if ( (!empty($_COOKIE['wordpressuser_' . COOKIEHASH]) &&
!wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH], true)) ||
(empty($_COOKIE['wordpressuser_' . COOKIEHASH])) ) {
header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday
(empty($_COOKIE['wordpressuser_' . COOKIEHASH])) ) {
header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));

View File

@ -19,6 +19,10 @@ case 'logout':
setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Location: wp-login.php');
exit();