2013-05-10 45 views
0

我接管了一个笨拙安装的Rails应用程序。其资产已经破产。 Chrome审计回报:Plesk vs rails3资产

> Leverage browser caching 

The following resources are missing a cache expiration. 
Resources that do not specify an expiration may not be cached by browsers: 

jquery-1.8.3.js 
jquery-ui-1.8.17.custom.min.js 
rails.js 
application.js 
jquery.ui.base.css 
jquery.ui.theme.css 

...etc. 

这显然会搅动我们的网络。 Wat吗?在Rails-land或Plesk的vhost.conf文件中,是否添加了一行配置,以便正确的HTTP标头出去?

请不要告诉我“只是重建资产” - 重建有点失败。

回答

1

查看Andre Spannig的页面,如果您只想调整当前域的Web服务器配置:Plesk 10 and vhost.conf。 这帮了我一次不同的问题。

通过Rails可能有更好的方法,但我现在还没有意识到。

+0

tx no - 我运行/ usr/local/psa/admin/bin/httpdmng --reconfigure-domain ...并且错误依然存在。是的,我添加了这个剪辑到vhost.conf: ExpiresDefault“access plus 1 year” (和这个编辑系统SUCKS! ) – Phlip 2013-05-10 19:15:35

+0

添加/ExpiresActive On/ExpiresDefault A1209600 ...,然后重建conf,然后apachectl restart,全部修复它。 TX! – Phlip 2013-05-10 19:22:46