Only gzip text files.
It is not very productive to compress images so compress text only.pull/468/head
parent
aac849f6ea
commit
df9e29087f
|
@ -146,7 +146,7 @@ CachingMiddleware.prototype = new function () {
|
|||
var statusCode = responseCache[cacheKey].statusCode;
|
||||
|
||||
var pathStr = CACHE_DIR + 'minified_' + cacheKey;
|
||||
if (supportsGzip) {
|
||||
if (supportsGzip && (headers['content-type'] || '').match(/^text\//)) {
|
||||
pathStr = pathStr + '.gz';
|
||||
headers['content-encoding'] = 'gzip';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue