XF 1.5 Leverage browser caching

Chad

Active member
Testing google page speed test. For desktop and mobile, it shows

Leverage browser caching for the following cacheable resources:

Code:
    http://api.reftagger.com/v2/RefTagger.js (expiration not specified)
    https://www.biblegateway.com/votd/votd.write.callback.js (expiration not specified)
    http://www.gravatar.com/…Fxenforo%2Favatars%2Favatar_female_s.png (5 minutes)
    http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css (10 minutes)
    http://code.ionicframework.com/…onicons/2.0.1/fonts/ionicons.ttf?v=2.0.1 (10 minutes)
    https://apis.google.com/js/api.js (30 minutes)
    https://plus.google.com/js/client:plusone.js (30 minutes)
    https://oauth.googleusercontent.com/…e:rpc:shindig.random:shindig.sha1.js?c=2 (60 minutes)
    http://www.google-analytics.com/analytics.js (2 hours)

I added below, still same score. Anyone have an idea why?

Code:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
 
Are either of these options secure or wise? I have no idea but it showed improvement.

No cache:

<IfModule mod_rewrite.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule

Cache

<IfModule mod_rewrite.c>
<FilesMatch "\.(jpe?g|png|gif|js|css)$">
ExpiresActive On
ExpiresDefault "access plus 1 week"
</FilesMatch>
</IfModule
 
Last edited:
Top Bottom