Changeset 553 for trunk/lib/JS.inc.php


Ignore:
Timestamp:
Dec 15, 2015 9:40:29 PM (8 years ago)
Author:
anonymous
Message:

Minor change to caching of JS and CSS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/JS.inc.php

    r502 r553  
    3939        'character_set' => 'utf-8',
    4040        'cache_js' => false,
     41        'cache_seconds' => 86400,
    4142        'strip_whitespace' => false,
    4243        'output_compression' => false,
     
    140141
    141142        if ($this->getParam('cache_js')) {
    142             header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $latest_mtime) . ' GMT');
    143             header('Cache-Control: public, max-age=86400');
    144             header('Pragma: public');
     143            header(sprintf('Last-Modified: %s GMT', gmdate('D, d M Y H:i:s', $latest_mtime), null));
     144            header(sprintf('Cache-Control: private, max-age=%s', $this->getParam('cache_seconds')));
     145            header('Pragma: private');
    145146        } else {
    146147            header('Expires: -1');
Note: See TracChangeset for help on using the changeset viewer.