我正在尝试为我的网站整理缓存,这是一个非常大的电子商务网站,超过45,000种产品并计算http://comparedeals.net。
我添加了一个缓存插件wp超级缓存,但问题是当我在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缓存,将该分数提高到94但我的网页加载速度减慢到60秒。
我基本上只是想让我的网站尽快加载任何建议吗?
此外我的托管是业务级共享bluehost云站点,所以我假设我有必要的资源。
答案 0 :(得分:3)
首先让我们分开页面缓存和浏览器缓存,它们是不同的东西。
W3总缓存是一个很棒的插件,但它有很多设置,有时很难正确设置(因此您的网站速度变慢)。
WP Super Cache不太复杂,适用于大多数网站,但它没有浏览器缓存控制功能。
我的建议是:继续使用WP Super Cache并手动设置浏览器缓存。为此,您需要编辑.htaccess文件并按类型提供资源到期。我建议你阅读这篇Optimizing WordPress – Browser Cache文章以了解什么是浏览器缓存,在文章中你将看到利用浏览器缓存的故障安全.htaccess规则的示例,只是将它们添加到当前的.htaccess文件中。
注意:必须在您的服务器上启用mod_expires(默认情况下通常会启用)