【问题标题】:Speed Up Wordpress/Woocommerce - WP Super Cache - "Leverage Browser Caching"加速 Wordpress/Woocommerce - WP Super Cache - “利用浏览器缓存”
【发布时间】:2016-11-11 06:35:05
【问题描述】:

我正在尝试为我的网站整理缓存,该网站是一个非常大的电子商务网站,拥有超过 45,000 种产品并且计数http://comparedeals.net

我添加了一个缓存插件 wp super cache,但问题是当我在https://tools.pingdom.com 测试我的网站时,浏览器缓存的分数仅为 4。https://tools.pingdom.com/#!/dFhyLB/http://comparedeals.net

**4     Leverage browser caching**

The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

    http://comparedeals.net/wp-content/themes/wootique-child/style.css
    http://comparedeals.net/wp-content/themes/wootique/css/reset.css
    http://comparedeals.net/wp-content/themes/wootique/custom.css
    http://comparedeals.net/wp-content/themes/wootique/functions/css/shortcodes.css
    http://comparedeals.net/wp-content/themes/wootique/images/ico-cart-light.png
    http://comparedeals.net/wp-content/themes/wootique/images/ico-search.png
    http://comparedeals.net/wp-content/themes/wootique/styles/default.css
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-5s-16GB-Gold-200x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-5s-16GB-Space-Grey-200x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-6s-16GB-Space-Grey-123x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-SE-16GB-Gold-96x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-SE-16GB-Rose-Gold-97x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-SE-16GB-Silver-96x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Apple-iPhone-SE-16GB-Space-Grey-96x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/HTC-10-32GB-Glacial-Silver-100x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/LG-G5-32GB-Titan-Grey-100x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Samsung-Galaxy-S7-32GB-Black-101x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Samsung-Galaxy-S7-Edge-32GB-Black-98x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/Sony-Xperia-Z5-Black-100x200.png
    http://comparedeals.net/wp-content/uploads/2016/07/comparedeals-logo.png
    http://comparedeals.net/wp-content/uploads/slider2/b3b5017c06a693ceb7a6c5c279a5795d.jpeg
    http://comparedeals.net/wp-content/uploads/slider2/s1.jpeg
    http://comparedeals.net/wp-content/uploads/slider2/upgrade-desktop_v2.jpeg
    http://comparedeals.net/wp-includes/js/thickbox/loadingAnimation.gif
    http://fonts.googleapis.com/css?family=Montserrat:400&subset=latin
    http://fonts.googleapis.com/css?family=Varela+Round%3Aregular

如何使用 wp 超级缓存提高我的网站缓存分数,我尝试了 W3 Total cache,该分数增加到 94,但我的页面加载速度减慢到 60 秒。

我基本上只是希望我的网站尽快加载,请问有什么建议吗?

另外,我的主机是企业级共享 bluehost 云站点,所以我认为我有必要的资源。

【问题讨论】:

    标签: wordpress performance caching


    【解决方案1】:

    首先让我们分开页面缓存和浏览器缓存,它们是不同的东西。

    W3 Total cache 是一个很棒的插件,但它有很多设置,有时很难正确设置它(结果你的网站变慢了)。

    WP Super Cache 不太复杂,适用于大多数网站,但它没有浏览器缓存控制功能。

    我的建议是:继续使用 WP Super Cache 并手动设置浏览器缓存。为此,您需要编辑您的 .htaccess 文件并按类型为您的资源提供到期时间。我建议您阅读这篇Optimizing WordPress – Browser Cache 文章以了解什么是浏览器缓存,您还将在文章中看到利用浏览器缓存的故障安全 .htaccess 规则示例,只需将它们添加到您当前的 .htaccess 文件中即可。

    注意:mod_expires 必须在您的服务器上启用(通常默认启用)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-10
      • 2011-10-15
      相关资源
      最近更新 更多