bundle exec rake assets:precompile 编译后的 application 有 300k(就只有 bootstrap、jquery、kindeditor) 加载的时间有两秒,再上图片的渲染感觉网页加载特别慢,求大神们指点下,我在 nginx 是这样设置的
http {
passenger_root /usr/local/rvm/gems/ruby-2.0.0-p598/gems/passenger-4.0.59;
passenger_ruby /usr/local/rvm/gems/ruby-2.0.0-p598/wrappers/ruby;
passenger_nodejs /root/.nvm/v0.10.36/bin/node;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 5;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php;
}
server {
listen 90;
server_name www.xxxx.cn;
root /var/lib/jenkins/workspace/xxxx/public;
passenger_enabled on;
location ~* \.(js|css)$ {
expires 30d;
}
location ~* \.(jpg|png|jpeg|gif){
expries 30d;
}
location ^~ /assets/ {
expries 30d;
}
}
我应该怎么优化下才好