Skip to content

Commit 3d49bfb

Browse files
author
Sergey Shvets
committed
MAGETWO-92355: [QUANS] Client-side caching of js-translation.js.
1 parent 856def3 commit 3d49bfb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nginx.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ location /static/ {
103103
rewrite ^/static/(version[^/]+/)?(.*)$ /static/$2 last;
104104
}
105105

106-
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
106+
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|json)$ {
107107
add_header Cache-Control "public";
108108
add_header X-Frame-Options "SAMEORIGIN";
109109
expires +1y;

pub/static/.htaccess

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ AddType application/xml xml
9797
ExpiresByType application/x-bzip2 "access plus 0 seconds"
9898

9999
# CSS, JavaScript, html
100-
<FilesMatch \.(css|js|html)$>
100+
<FilesMatch \.(css|js|html|json)$>
101101
ExpiresDefault "access plus 1 year"
102102
</FilesMatch>
103103
ExpiresByType text/css "access plus 1 year"
104104
ExpiresByType text/html "access plus 1 year"
105105
ExpiresByType application/javascript "access plus 1 year"
106+
ExpiresByType application/json "access plus 1 year"
106107

107108
# Favicon, images, flash
108109
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg)$>

0 commit comments

Comments
 (0)