How to Leverage Browser Caching Wordpress?

Source: Internet
Author: User
Keywords leverage browser caching wordpress browser caching wordpress plugin caching wordpress plugin
When we mentioned how to configure the Wordpress cache, the first reaction of most people might be: using plug-ins, such as WP SUPER CACHE, works well. But in fact, the current wordpress caching plugins have some influence on the speed of the website, although not very much. So is there a simpler way to manually configure the wordpress browser cache? Of course there is!
Simple Application Server
USD1.00 New User Coupon
* Only 3,000 coupons available.
* Each new user can only get one coupon(except users from distributors).
* The coupon is valid for 30 days from the date of receipt.

Before talking about the method of manually configuring WP caching, let’s first briefly explain the benefits of browser caching:
1. Reduce loading time and improve the opening speed of the site;

2. Effectively reduce the bounce rate, which is an important indicator of whether the website is excellent;

3. It is also very important to reduce the carrying pressure of your host or server.

How to check if your WordPress website makes full use of browser cache:
We can use web tools such as Google PageSpeed Insights or Gtmetrix to do a test. Taking my blog as an example, we can clearly see the cache settings and time of various files on the website.


How to manually configure the WordPress browser cache (two steps)
Step 1: Access your website via FTP

I prefer FileZilla because it contains many functions and is quite simple to use.


Step 2: Edit the .htaccess file

.htaccess is a WordPress core file, we will use .htaccess to tell your server which files to cache. Look for the .htaccess file in the root directory of the website. Right-click it and select the View/Edit option. Then open the file with a local text editor and make changes to it:


Find the #END WordPress line and add the following code:

ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 week”
ExpiresByType text/html “access 1 month”
ExpiresByType text/x-javascript “access 1 week”
ExpiresDefault “access 1 month”

Even if you don't have any foundation, you can probably understand the meaning of the above code. It is nothing more than the cache time of various image types and the cache time of other types of files on the website. Because the personal blog site will not change much, I think these cache times are reasonable. After editing the .htaccess article, remember to save and overwrite the upload.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.