How to allow loading of external fonts | Apache | Action Log
How to allow loading of external fonts | Code Snippets | Category Buttons Listing
OborWiki backup strategy | OborWiki | How to create access toggle buttons (on OborWiki)
Alternate Recent Changes Example | PmWiki | Category Buttons Listing
How to allow loading of external fonts | Web Development | Category Buttons Listing
This is how I configure Apache to set cache-control headers for cacheable assets. (The code below is placed in the .htaccess file of every wiki on OborWiki.)
# One month for most static assets
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico|ttf|otf|svg)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>
# BEGIN EXPIRES
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 days"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/html "access plus 1 second"
ExpiresByType text/plain "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-icon "access plus 1 year"
</IfModule>
# END EXPIRES