How to Enable Leverage Browser Caching on Nginx

How to Enable Leverage Browser Caching on Nginx

by admin

You can enable Leverage Browser Caching via the settings page of WP Fastest Cache for Apache servers but You cannot be enable Leverage Browser Caching for the Nginx servers so you have to enable it manually.

You need to add the following code into /etc/nginx/nginx.conf to enable Leverage Browser Caching on nginx servers.

location ~* \.(css|js|ico|gif|jpeg|jpg|webp|png|svg|eot|otf|woff|woff2|ttf|ogg)$ {
	expires max; 
}

Restart NGINX after with this command.

$ service nginx restart

Related articles

Placeholder Image
Image Slider and Render-blocking JavaScript

Google recommends to load the JavaScripts after html, css and images.

Placeholder Image
Cloudflare Enable Browser Cache

You can enable Leverage Browser Caching on the settings page of WP Fastest Cache but if you are using Cloudflare,…

How to Enable Gzip Compression in WordPress
How to Enable Gzip Compression in WordPress

Used by more than half of all websites, Gzip Compression remains popular today.

Ready to get started?

Purchase your first license and see why 1,500,000+ websites globally around the world trust us.