Support

Admin Tools

#28369 cache fonts and glyphicons

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Monday, 04 September 2017 00:40 CDT

bobpit
This is part of my .htaccess file:
============================================
# Font files expiration: 1 week after request
ExpiresByType application/vnd.ms-fontobject "now plus 1 week"
ExpiresByType application/x-font-ttf "now plus 1 week"
ExpiresByType application/x-font-opentype "now plus 1 week"
ExpiresByType application/x-font-woff "now plus 1 week"
ExpiresByType image/svg+xml "now plus 1 week"
============================================


Still google pagespeed complains:
=================================
Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
Leverage browser caching for the following cacheable resources:
https://mywebsite.com/…fonts/glyphicons-halflings-regular.woff2 (4 hours)
https://mywebsite.com/…/fonts/fontawesome-webfont.woff2?v=4.7.0 (4 hours)
=================================

I have already read this:
https://www.akeebabackup.com/support/admin-tools/Ticket/25959-improve-expire-also-for-font-files.html

Advice on how to fix the issue, please?

nicholas
Akeeba Staff
Manager
You should add
ExpiresByType font/woff2 "now plus 1 week"

at the end of that snippet.

Kindly note that this working is contingent to your web server having an up to date MIME type database which includes the correct MIME type for .woff2 files. If it doesn't you will have to ask your host to update their server or tell you how to register the font/woff2 MIME type to the .woff2 extension.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

bobpit
Hi

I did what you said and it did not work. So I asked the host to register the font/woff2 MIME type to the .woff2 extension.

They replied that I should add the following to my .htaccess:
AddType font/woff2 .woff2

It is working now.

Thank you very much.

nicholas
Akeeba Staff
Manager
You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!