What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Add Expire Header to WordPress Files

How to Add Expire Header to WordPress Files

Previously, we have already listed a lot of tips on how to reduce server response time for speeding up your WordPress site. After all, the fast page loading speed directly influences the reading experiences of your readers and indirectly affects the traffic. Even, all the main search engines take this point seriously when ranking the website. This time, we’d like to tell you how to add expire header to WordPress files, which is another effective method for the improvement of your site performance.

Make Use of the Far Future Expire Header Plugin

The Far Future Expire Header plugin has some lightweight features to effectively speed up your WordPress site. Firstly, you can enable the Far Future Expire feature. This way, the plugin will automatically modify the .htaccess file of your site by inserting the coding staff. The code will add the expire headers for all the common static file types, such as images, JavaScript and CSS.

Note that the expire header can specify the exact time for the validity of your static files. After that period, browsers will not re-fetch these files when landing on your pages. This can reduce the HTTP requests greatly so as to improve the website performance on the subsequent page views.

In addition, this plugin enables the GZIP compression for your website. After compressing the webpage output and sending to the web browsers, your page loading speed can be boosted greatly.

Finish the Far Future Expiration Settings

After installing this plugin, you need to click the Settings > Far Future Expiry button. Here, you can tick the checkbox to enable the Far Future Expiration feature and the GZIP Compression feature. After that, you should enter the number of days that determines the expiry date for your static files. Also, you should choose your wanted file types that can apply to this feature.

Far Future Expiration Settings

Here, we need to mention two things when using this plugin.

  • You need to make sure that the “mod_expires” module is activated. You can contact your hosting provider to check this.
  • With the activation of this plugin, your selected file types will be cached in the web browser until they expire. In this case, you’d better not to apply this feature to files that you change frequently.

Author

Susan Rose is a freelance writer who has a deep knowledge about WordPress. She loves everything related to website building since the freshman year at Christopher Newport University, and loves to share her experience with people all over all the world. This girl is popular among our readers as she is outgoing and energetic. In the daily life, Susan loves detective novels as it can train her logical thinking and creativity.

Close

Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!


Fatal error: Call to undefined function es_subbox() in /home/whatswp/public_html/wp-content/themes/mantra/footer.php on line 140