2

I was able to improve my gtmetrix rating a lot by adjusting the according widgets expirations, but I can't get rid of the last few, among them fancybox.gif (and the ones below)

https://verify.authorize.net/anetseal/seal.js ...ssl.google-analytics.com/ga.js ...static.hotjar.com/c/hotjar-163991.js?sv=5 ...s3.amazonaws.com/downloads.mailchimp.com/js/goal.min.js .../www.yafsparkle.com/skin/frontend/blacknwhite/default/images/fancybox/fancybox_loading.gif ...verify.authorize.net/anetseal/images/secure90x72.gif*

my htaccess looks like this, so the gif is included. Any ideas how I get rid of the remaining ones?

-- 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 text/x-javascript "access 1 month"
ExpiresByType text/javascript "access 1 week"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 week"
ExpiresByType application/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access plus 1 month"
</IfModule>
## EXPIRES CACHING ##


# 1 Month for most static assets
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>

1 Answer 1

0

Remote files such as anything NOT on your domain yafsparkle.com you won't be able to control the HTTP Headers as they are coming from a 3rd party resource, such as the authorize.net verisign seal, mailchimp coming from an AWS server, etc.

The fancybox_loading.gif however may not be catching the conditioning for the <filesMatch> directive because it's coming through via an AJAX request:

This is only a theory mind you and it appears the contents of the file referenced is base64 encoded as well, however the apache directive should be based off the filename itself and not the contents.

Related on a means to cache the loading in fancybox:

You may also look into mod_pagespeed module for Apache it offers a lot of features to help with lots of frontend optimization practices from Google themselves. https://developers.google.com/speed/pagespeed/module/

2
  • NP, and welcome to Magento StackExchange! :D
    – B00MER
    Commented Jul 7, 2016 at 0:50
  • 1
    thx a lot, I appreciate it! so much to learn ;) great to have a community for help!! Commented Jul 7, 2016 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.