Skip to content
This repository has been archived by the owner on Jul 3, 2022. It is now read-only.

Commit

Permalink
Smart Browser Cache Defaults (Revision) (szepeviktor#64)
Browse files Browse the repository at this point in the history
Fixed some mistakes seen in commit szepeviktor#62 by @Volnus

The original commit was done to the compatibility file
0.9.4.4-ConfigKeys.php instead of ConfigKeys.php.  I shifted the new
defaults into ConfigKeys.php and reverted 0.9.4.4-ConfigKeys.php back to
its original self.

I changed browsercache.cssjs.w3tc and browsercache.html.w3tc back to
false because these options only bloat up response data by including the
unnecessary header: "X-Powered-By: W3 Total Cache".  I also put back
browsercache.other.compression to true since @Volnus mistakenly thought
this compresses non-text files.  When enabled this compresses ico and
json mimes for apache, and the ico mime for nginx. json is a text file.
And although ico is not a text file it is common practice to compress
it.  So its efficient to keep browsercache.other.compression set to
true.
  • Loading branch information
amiga-500 authored and nigrosimone committed Sep 17, 2016
1 parent ebd19e0 commit 4e7d9a3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
28 changes: 14 additions & 14 deletions configs/0.9.4.4-ConfigKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -1184,31 +1184,31 @@
),
'browsercache.cssjs.expires' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.cssjs.lifetime' => array(
'type' => 'integer',
'default' => 31536000
),
'browsercache.cssjs.nocookies' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.cssjs.cache.control' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.cssjs.cache.policy' => array(
'type' => 'string',
'default' => 'cache_public_maxage'
),
'browsercache.cssjs.etag' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.cssjs.w3tc' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.cssjs.replace' => array(
'type' => 'boolean',
Expand All @@ -1224,27 +1224,27 @@
),
'browsercache.html.expires' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.html.lifetime' => array(
'type' => 'integer',
'default' => 3600
),
'browsercache.html.cache.control' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.html.cache.policy' => array(
'type' => 'string',
'default' => 'cache_public_maxage'
),
'browsercache.html.etag' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.html.w3tc' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.html.replace' => array(
'type' => 'boolean',
Expand All @@ -1256,31 +1256,31 @@
),
'browsercache.other.compression' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.other.expires' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.other.lifetime' => array(
'type' => 'integer',
'default' => 31536000
),
'browsercache.other.nocookies' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.other.cache.control' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.other.cache.policy' => array(
'type' => 'string',
'default' => 'cache_public_maxage'
),
'browsercache.other.etag' => array(
'type' => 'boolean',
'default' => true
'default' => false
),
'browsercache.other.w3tc' => array(
'type' => 'boolean',
Expand Down
22 changes: 11 additions & 11 deletions lib/W3/ConfigKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -1247,27 +1247,27 @@
),
'browsercache.cssjs.expires' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.cssjs.lifetime' => array(
'type' => 'integer',
'default' => 31536000
),
'browsercache.cssjs.nocookies' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.cssjs.cache.control' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.cssjs.cache.policy' => array(
'type' => 'string',
'default' => 'cache_public_maxage'
),
'browsercache.cssjs.etag' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.cssjs.w3tc' => array(
'type' => 'boolean',
Expand All @@ -1287,23 +1287,23 @@
),
'browsercache.html.expires' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.html.lifetime' => array(
'type' => 'integer',
'default' => 3600
),
'browsercache.html.cache.control' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.html.cache.policy' => array(
'type' => 'string',
'default' => 'cache_public_maxage'
),
'browsercache.html.etag' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.html.w3tc' => array(
'type' => 'boolean',
Expand All @@ -1323,27 +1323,27 @@
),
'browsercache.other.expires' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.other.lifetime' => array(
'type' => 'integer',
'default' => 31536000
),
'browsercache.other.nocookies' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.other.cache.control' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.other.cache.policy' => array(
'type' => 'string',
'default' => 'cache_public_maxage'
),
'browsercache.other.etag' => array(
'type' => 'boolean',
'default' => false
'default' => true
),
'browsercache.other.w3tc' => array(
'type' => 'boolean',
Expand Down

0 comments on commit 4e7d9a3

Please sign in to comment.