0

I use the following code for browser caching in my .htaccess:

# turns cache on for 1 month
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
</IfModule>
<ifmodule mod_headers.c>
<filesmatch "\\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesmatch>
<filesmatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesmatch>
<filesmatch "\\.(js)$">
Header set Cache-Control "max-age=216000, private"
</filesmatch>
</ifmodule>

But when i run the google page speed tool there are serveral .js files which are not included in the browser caching:

http://www.hwi-sicherheit.de/…jquery.form.min.js?ver=3.51.0-2014.06.20 (2,5 Tage)
http://www.hwi-sicherheit.de/…-form-7/includes/js/scripts.js?ver=4.3.1 (2,5 Tage)
http://www.hwi-sicherheit.de/…-wordpress/js/mappress.min.js?ver=2.43.4 (2,5 Tage)
http://www.hwi-sicherheit.de/…-shortcodes/includes/js/rsvp.js?ver=1.82 (2,5 Tage)
http://www.hwi-sicherheit.de/…s/jquery/jquery-migrate.min.js?ver=1.2.1 (2,5 Tage)
http://www.hwi-sicherheit.de/…-includes/js/jquery/jquery.js?ver=1.11.3 (2,5 Tage)
http://www.hwi-sicherheit.de/…s/jquery/jquery.masonry.min.js?ver=3.1.2 (2,5 Tage)
http://www.hwi-sicherheit.de/…/wp-includes/js/masonry.min.js?ver=3.1.2 (2,5 Tage)
http://www.hwi-sicherheit.de/…s/wp-includes/js/wp-embed.min.js?ver=4.4 (2,5 Tage)

Why are these files not included in the browser caching? Has anybody an idea to solve this problem??

tom84
  • 371
  • 1
  • 3
  • 15
  • i tried a lot, but i cant find the mistake. can anybody help me? – tom84 Jan 05 '16 at 07:10
  • i could not solve this problem... any ideas? – tom84 Feb 04 '16 at 10:08
  • Question: Are these files external? If so, then you need to use a `cron` to fix it. See my answer here: [Leverage Browser Caching for 3rd party JS](http://stackoverflow.com/questions/38376871/leverage-browser-caching-for-3rd-party-js/38377857#38377857). However, if they're local, then it will be because your suffix looks like this `js?ver=4.3.1`. – Joe Jan 10 '17 at 15:41
  • Possible duplicate of [Leverage Browser Caching js?ver=](http://stackoverflow.com/questions/41914331/leverage-browser-caching-jsver) – Joe Feb 08 '17 at 14:53

0 Answers0