我的.htaccess文件:利用瀏覽器緩存的問題
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# Expires Headers - 2678400s = 31 days
<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 2678400 seconds"
ExpiresByType text/html "access plus 7200 seconds"
ExpiresByType image/gif "access plus 2678400 seconds"
ExpiresByType image/jpeg "access plus 2678400 seconds"
ExpiresByType image/png "access plus 2678400 seconds"
ExpiresByType text/css "access plus 750000 seconds"
ExpiresByType text/javascript "access plus 2678400 seconds"
ExpiresByType application/x-javascript "access plus 2678400 seconds"
</ifmodule>
# Cache Headers
<ifmodule mod_headers.c>
# Cache specified files for 31 days
<filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Cache-Control "max-age=2678400, public"
</filesmatch>
# Cache HTML files for a couple hours
<filesmatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesmatch>
# Cache PDFs for a day
<filesmatch "\.(pdf)$">
Header set Cache-Control "max-age=86400, public"
</filesmatch>
# Cache Javascripts for 31 days
<filesmatch "\.(js)$">
Header set Cache-Control "max-age=2678400, private"
</filesmatch>
</ifmodule>
www.gtmetrix.com接受我的槓桿瀏覽器緩存,但谷歌網頁速度不接受文件:
https://apis.google.com/js/api.js (30 dakika)
https://apis.google.com/js/platform.js (30 dakika)
http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (60 dakika)
http://pagead2.googlesyndication.com/pagead/osd.js (60 dakika)
https://oauth.googleusercontent.com/…e:rpc:shindig.random:shindig.sha1.js?c=2 (60 dakika)
http://www.google-analytics.com/analytics.js (2 saat)
如何解決這個問題。我試過超級緩存,總緩存,快速緩存等緩存插件。但是,這些都是減少我的谷歌網頁速度得分。現在我的谷歌網頁速度得分是87/100和gtmetrix 93/100。
我的網站是: www.guzellikperisi.com
那些不是你的文件。你不能影響他們。 – ceejayoz
那麼你的建議是什麼? – Dauezevy
我的建議是你不要擔心他們。 – ceejayoz