How to Add Expires Headers in WordPressVijay Kumar
The main advantage of adding far-future expires headers to your WordPress site is browser caches CSS/Images/JS file and loads user-requested page by reducing the HTTP requests. Ultimately user enjoys fast loading websites, so without waiting much, just add the following code to your .htaccess file. Make sure that, the following code should be added to the .htaccess file properly.
Tip: If your CSS and JS files don’t change often then you can set longer expiry date. You can also add expires headers in WordPress with the most popular cache plugin of W3 total cache.
Note: You can’t set expires headers for Google fonts, Google AdSense, Analytics, and other third-party resources.