简体   繁体   中英

Speed Up Wordpress/Woocommerce - WP Super Cache - “Leverage Browser Caching”

I'm trying to sort out caching for my website which is a very large eCommerce site over 45,000 products and counting http://comparedeals.net .

I have added a caching plugin wp super cache but the problem is when I test my site at https://tools.pingdom.com the score for browser caching is only 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

How can I increase my website score for caching using wp super cache, I tried W3 Total cache which increased that score to 94 but my pages slowed down to 60 seconds to load a page.

I basically just want my website to load as fast as possible any advice please?

Also my hosting is business level shared bluehost cloud site so I assume I have the necessary resources.

First of all let's separate page cache and browser cache, they are different things.

W3 Total cache is great plugin but it has a lot of settings and sometimes it's hard to setup it properly(as result your site was slowed down).

WP Super Cache is less complicated and suitable for most website but it doesn't have browser cache control feature.

What I suggest is: Continue using WP Super Cache and setup browser cache manually. For this you need to edit your .htaccess file and give expiration to your resources by type. I suggest you to read this Optimizing WordPress – Browser Cache article to understand what is browser cache also in article you'll see example of fail-safe .htaccess rules to leverage browser caching, just prepend them to your current .htaccess file.

Note: mod_expires must be enabled on your server(it's usually enabled by default)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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