简体   繁体   English

问题利用浏览缓存 wordpress

[英]Problem leverage browse caching wordpress

Hi we need to integrate the leveral browse caching in our site on ovh gtmetrix exits this problem https://gtmetrix.com/reports/www.curiosone.world/Oh2cgYli Leverage browser caching for the following cacheable resources:嗨,我们需要在 ovh 上的站点中集成杠杆浏览缓存 gtmetrix 退出此问题https://gtmetrix.com/reports/www.curiosone.world/Oh2cgYli为以下可缓存资源利用浏览器缓存:

https://www.curiosone.de/favicon.ico (15 minutes)
https://www.googletagmanager.com/gtag/js?id=AW-699954844 (15 minutes)
https://www.googletagmanager.com/gtag/js?id=AW-699954844&l=dataLayer&cx=c (15 minutes)
https://www.googletagmanager.com/gtag/js?id=UA-143259546-1 (15 minutes)
https://amplify.outbrain.com/cp/obtp.js (20 minutes)
https://connect.facebook.net/en_US/fbevents.js (20 minutes)
https://connect.facebook.net/it_IT/all.js (20 minutes)
https://connect.facebook.net/signals/config/734658696982369?v=2.9.18&r=stable (20 minutes)
https://connect.facebook.net/signals/plugins/identity.js?v=2.9.18 (20 minutes)
https://bat.bing.com/bat.js (30 minutes)
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (1 hour)
https://www.googleadservices.com/pagead/conversion_async.js (1 hour)
https://www.google-analytics.com/analytics.js (2 hours)
https://cdn.taboola.com/libtrc/unip/1218990/tfa.js (4 hours 1 second)

Is it possible to integrate it on our site for this data?是否可以将其集成到我们的网站以获取这些数据? If yes, how?如果是,如何?

Just on that site you mentioned there is a tutorial showing you how to enable caching in the .htaccess file on your server (you can access it using FTP ):就在您提到的那个站点上,有一个教程向您展示了如何在服务器上的.htaccess文件中启用缓存(您可以使用FTP访问它):

https://gtmetrix.com/leverage-browser-caching.html https://gtmetrix.com/leverage-browser-caching.html

Personally I use this piece of code for my website.我个人将这段代码用于我的网站。

# Enable Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 30 seconds"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/ico "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 14 days"
ExpiresByType text/javascript "access plus 3 months"
ExpiresByType application/x-javascript "access plus 3 months"
ExpiresByType application/javascript "access plus 3 months"
ExpiresDefault "access plus 1 month"
</IfModule>

This is one of the things that helped me to get a Pagespeed Score of 98%...这是帮助我获得 98% 的Pagespeed 分数的原因之一......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM