aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/elgglib.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-10 18:35:13 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-10 18:35:13 +0000
commita2e60f2a4853e0776c68231efac4d3b77ff0f4b8 (patch)
tree443cc31568a3432dae394bb46f2c79448b931bd1 /engine/lib/elgglib.php
parent382b97b04b2114c73ee2857bd6aa12385f11d203 (diff)
downloadelgg-a2e60f2a4853e0776c68231efac4d3b77ff0f4b8.tar.gz
elgg-a2e60f2a4853e0776c68231efac4d3b77ff0f4b8.tar.bz2
Content length headers on JS and css
git-svn-id: https://code.elgg.org/elgg/trunk@2433 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r--engine/lib/elgglib.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 7afa7f17f..253421c7f 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1937,13 +1937,16 @@
function js_page_handler($page) {
if (is_array($page) && sizeof($page)) {
+ $js = str_replace('.js','',$page[0]);
+ $return = elgg_view('js/' . $js);
+
header('Content-type: text/javascript');
header('Expires: ' . date('r',time() + 864000));
header("Pragma: public");
- header("Cache-Control: public");
- $js = str_replace('.js','',$page[0]);
- echo elgg_view('js/' . $js);
-
+ header("Cache-Control: public");
+ header("Content-Length: " . strlen($return));
+
+ echo $return;
exit;
}