page speed score

This commit is contained in:
coderaiser 2012-06-12 15:10:00 +00:00
parent ddfe51c75c
commit bc43902beb
2 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,7 @@ Cloud Commander [![Build Status](https://secure.travis-ci.org/coderaiser/cloudcm
===============
**Cloud Commander** - two-panels file manager, totally writed on js.
View [demo](http://cloudcmd.cloudfoundry.com/ "demo").
PageSpeed Score of [97](https://developers.google.com/speed/pagespeed/insights#url=http_3A_2F_2Fcloudcmddemo.cloudfoundry.com_2F&mobile=false "score") (out of 100).
Benefits
---------------

View file

@ -194,7 +194,10 @@ CloudServer.generateHeaders = function(pName, pGzip){
else lType='text/plain';
return {
'Content-Type': lType+'; charset=UTF-8',
/* if type of file any, but img -
* then we shoud specify charset
*/
'Content-Type': lType + (lType.indexOf('img')<0?'; charset=UTF-8':''),
'cache-control': 'max-age='+(31337*21),
'last-modified': new Date().toString(),
'content-encoding': pGzip?'gzip':'',