Leverage Browser Caching Question

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
DanHouston
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 06, 2015 7:12 pm

Leverage Browser Caching Question

Post by DanHouston » Thu Oct 25, 2018 9:53 pm

I am using the page speed insights tool and I have most optimizations in place, But I'm still getting these "Leverage Browser Caching" suggestions on mobile:

Code: Select all

https://www.google-analytics.com/plugins/ua/linkid.js (60 minutes)
https://www.google-analytics.com/analytics.js (2 hours)
https://www.mysite.com/…template/gzip.php?bootstrap-a762dbab.css (24 hours)
https://www.mysite.com/…plate/gzip.php?bootstrap.min-3470f114.js (24 hours)
https://www.mysite.com/…/gzip.php?jquery-migrate.min-5476e7c7.js (24 hours)
https://www.mysite.com/…e/gzip.php?jquery-noconflict-4e95bfa6.js (24 hours)
https://www.mysite.com/…template/gzip.php?jquery.min-7b7986fa.js (24 hours)
https://www.mysite.com/…ate/gzip.php?pro-jquery.lazy-a23fb0a7.js (24 hours)
https://www.mysite.com/…edia/template/gzip.php?theme-c3d348c9.js (24 hours)
https://www.mysite.com/…dia/template/gzip.php?theme-f8445b09.css (24 hours)
It may be worth noting that before my optimizations, this list was much larger.

Quick rundown:
I have JCHOptimize Pro, Jotcache and this snippet running on .htaccess:

Code: Select all

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
# AddOutputFilterByType DEFLATE text/css
# AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
# AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/font
AddOutputFilterByType DEFLATE application/font-truetype
AddOutputFilterByType DEFLATE application/font-ttf
AddOutputFilterByType DEFLATE application/font-otf
AddOutputFilterByType DEFLATE application/font-opentype
AddOutputFilterByType DEFLATE application/font-woff
AddOutputFilterByType DEFLATE application/font-woff2
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/woff
AddOutputFilterByType DEFLATE font/woff2
# For Olders Browsers Which Can't Handle Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
Note further that I will get the "Leverage Browser Caching" and this list regardless of whether or not I code out these lines:

Code: Select all

# AddOutputFilterByType DEFLATE text/css
# AddOutputFilterByType DEFLATE text/javascript
Obviously the commonality between all of them is gzip.php. Can anyone help me understand and take care of this?

DanHouston
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 06, 2015 7:12 pm

Re: Leverage Browser Caching Question

Post by DanHouston » Thu Oct 25, 2018 9:59 pm

Also noticing that the "Leverage Browser Caching" message is there regardless of whether on not I enable gzip compression in joomla back end

SharkyKZ
Joomla! Ace
Joomla! Ace
Posts: 1597
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: Leverage Browser Caching Question

Post by SharkyKZ » Fri Oct 26, 2018 5:46 am

With your code you are enabling compression, not caching. Use Expires or Cache-Control to enable caching. But be careful, caching can cause headaches for you and your visitors.

See bottom part of the first snippet https://docs.joomla.org/Htaccess_examples_(security)


Post Reply

Return to “Performance - Joomla! 3.x”