Hallo,
wenn ich den Pagespeed teste (Pagespeed insight) wird mir ein Fehler angezeigt, dass ich das Browsercaching für folgende .js aktivieren soll.
http://www.domain.de/…s/fonts/fontawesome-webfont.woff?v=4.3.0 (2 Tage)
http://www.domain.de/…jquery.form.min.js?ver=3.51.0-2014.06.20 (2,5 Tage) http://www.domain.de/…-form-7/includes/js/scripts.js?ver=4.2.2 (2,5 Tage) http://www.domain.de/…-wordpress/js/mappress.min.js?ver=2.43.4 (2,5 Tage) http://www.domain.de/…-shortcodes/includes/js/rsvp.js?ver=1.77 (2,5 Tage) http://www.domain.de/…ss-bottom-optin-box/js/myjs.js?ver=4.2.4 (2,5 Tage) http://www.domain.de/…slider/js/jquery.flexslider.js?ver=4.2.4 (2,5 Tage) http://www.domain.de/…siness-testimonial/js/fader.js?ver=4.2.4 (2,5 Tage) http://www.domain.de/…s/jquery/jquery-migrate.min.js?ver=1.2.1 (2,5 Tage)
- In der htaccess habe ich folgende Anweisungen stehen:
## 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 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 2 days"
</IfModule>
## EXPIRES CACHING ##
##js-Dateien ins browser-caching einbeziehen
<filesMatch "\\.(js|js.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
##Ende js-Dateien ins browser-caching einbeziehen
# Deflate Compression by FileType
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-shockwave-flash
</IfModule>
# 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"
Da ist doch das Javascript mit enthalten. Weiß Jemand wie ich die oben genannten Elemente mit den das Caching einbeziehen kann?
Beste vGrüße
Tom