-
AuthorPosts
-
July 20th, 2019 at 08:30 #84619
My website – https://diamondrcreative.com – is using Anima Plus and getting warning from PageSpeed Insights regarding Leveraging Browser Cache – Serve static assets with an efficient cache policy
https://diamondrcreative.com/wp-content/themes/anima-plus/resources/fonts/socials.woff
https://diamondrcreative.com/wp-content/themes/anima-plus/resources/fonts/blocks.woff
https://diamondrcreative.com/wp-content/themes/anima-plus/resources/fonts/iconmeta.ttfI’ve tried different variations listed below but no luck. I’ve tried the following the htaccess – are they incorrect, wrong, or useless? LMK
Also LMK if there’s a correct addition to htaccess to correct these, please.AddType font/woff .woff
AddType font/woff2 .woff2
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType application/x-font-woff2 .woff2
AddType image/svg+xml .svg
AddType application/font-sfnt .otf .ttf
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
AddType application/vnd.ms-fontobject .eotExpiresByType application/vnd.ms-fontobject “access plus 1 year”
ExpiresByType application/x-font-ttf “access plus 1 year”
ExpiresByType application/x-font-opentype “access plus 1 year”
ExpiresByType application/x-font-woff “access plus 1 year”
ExpiresByType application/x-font-woff2 “access plus 6 month”
ExpiresByType application/font-woff “access plus 1 year”
ExpiresByType application/font-woff2 “access plus 6 month”
ExpiresByType application/font-sfnt “access plus 1 year”
ExpiresByType font/ttf “access plus 1 year”
ExpiresByType font/otf “access plus 1 year”
ExpiresByType font/woff “access plus 1 year”
ExpiresByType font/woff2 “access plus 1 year”Any help would be sincerely appreciated – thank you.
Website: diamondrcreative.com
July 21st, 2019 at 14:43 #84666As described in this GTmetrix article (which you most likely already read), browser caching can be enabled with specific configuration rules at the server level (because the webserver needs to pass along specific headers to the browser).
The article describes some rules for the Apache web server (which require the specific mod_expire module to be enabled on the server hosting your site). Other web servers may use a different configuration – I suggest to contact your hosting provider for more information on what server software they use and what configuration changes are allowed.
If you like our creations, help us share by rating them on WordPress.org.
Please read the available documentation and search the forums before posting.July 22nd, 2019 at 23:45 #84678Is your server NGINX? If so you can use this code snippet:
# browser caching of static assets location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf)$ { expires 7d; }
which was taken from this guide: Serve Static Assets With An Efficient Cache Policy guide
Website: pagespeedplus.com
July 26th, 2019 at 21:55 #84831Thanks leaderint! Like your website!
No, it is Apache. Still haven’t found a solution but do appreciate your effort. 🙂
Website: diamondrcreative.com
July 28th, 2019 at 19:26 #84859I answered in the other topic:
If you like our creations, help us share by rating them on WordPress.org.
Please read the available documentation and search the forums before posting. -
AuthorPosts
You need to log in to reply to this topic.