Hello, I have a problem with
Serve static assets with an efficient cache policy, which shows me in page speed test by Google, can you help me fix the problem?
Issue
Settings
Additional nginx directives
Serve static files directly by nginx - ACTIVATED
Htaccess in attach files
I also use wp rocket and I installed the wp rocket module on the server, I think I have to add something in the directives but I'm not sure.
I am a beginner and I want help, probably htaccess is inappropriate, please offer me a better option, if possible.
Don't throw stones and post only if you can help me. Thanks!
Serve static assets with an efficient cache policy, which shows me in page speed test by Google, can you help me fix the problem?
Issue
Settings
Additional nginx directives
Code:
# Enable Gzip compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component
text/xml
text/javascript;
# Cache static files
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf|webp)$ {
add_header "Access-Control-Allow-Origin" "*";
access_log off;
log_not_found off;
expires 30d;
}
Serve static files directly by nginx - ACTIVATED
Code:
ac3 avi bmp bz2 css cue dat doc docx dts eot exe flv gif gz htm html ico img iso jpeg jpg js mkv mp3 mp4 mpeg mpg ogg pdf png ppt pptx qt rar rm svg swf tar tgz ttf txt wav woff woff2 xls xlsx zip webp
Htaccess in attach files
I also use wp rocket and I installed the wp rocket module on the server, I think I have to add something in the directives but I'm not sure.
I am a beginner and I want help, probably htaccess is inappropriate, please offer me a better option, if possible.
Don't throw stones and post only if you can help me. Thanks!