From fb7ac1b3766c38a7159c9a245d364eb8fb46cd7f Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 15 Aug 2008 18:45:35 +0000 Subject: Caching enhancements git-svn-id: https://code.elgg.org/elgg/trunk@1949 36083f99-b078-4883-b0ff-0f9b5a30f544 --- _css/css.php | 3 +++ mod/profile/icon.php | 1 + mod/profile/javascript.php | 4 ++++ views/default/friends/picker.php | 4 ++++ views/default/page_elements/header.php | 13 +++++++++++++ 5 files changed, 25 insertions(+) diff --git a/_css/css.php b/_css/css.php index 33a5305ed..30b179d16 100644 --- a/_css/css.php +++ b/_css/css.php @@ -12,6 +12,9 @@ */ header("Content-type: text/css"); + header('Expires: ' . date('r',time() + 864000)); + header("Pragma: public"); + header("Cache-Control: public"); require_once(dirname(dirname(__FILE__)) . "/engine/start.php"); diff --git a/mod/profile/icon.php b/mod/profile/icon.php index 184c1e2c2..f13ec7322 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -44,6 +44,7 @@ } header("Content-type: image/jpeg"); + header('Expires: ' . date('r',time() + 864000)); header("Pragma: public"); header("Cache-Control: public"); echo $contents; diff --git a/mod/profile/javascript.php b/mod/profile/javascript.php index 973908d6c..e45a56b78 100644 --- a/mod/profile/javascript.php +++ b/mod/profile/javascript.php @@ -13,6 +13,10 @@ // Get engine require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + header("Content-type: text/javascript"); + header('Expires: ' . date('r',time() + 864000)); + header("Pragma: public"); + header("Cache-Control: public"); echo elgg_view('profile/javascript'); ?> \ No newline at end of file diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index db33ffc09..18d70de5a 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -13,6 +13,10 @@ * * @uses $vars['entities'] The array of ElggUser objects */ + + // Let the system know that the friends picker is in use + global $pickerinuse; + $pickerinuse = true; // Initialise internalname if (!isset($vars['internalname'])) { diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php index 609e6181b..933cfaeb7 100644 --- a/views/default/page_elements/header.php +++ b/views/default/page_elements/header.php @@ -59,11 +59,24 @@ END; + + + + -- cgit v1.2.3