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
Redirection to /wp-content/cache/all/index.html Problem

If there is a 301 redirection rule in htaccess, apache may redirect the url to http://yourdomain.com/wp-content/cache/all/index.html.

Placeholder Image
htaccess Gzip doesn’t work

Sometimes the files are not compressed although the gzip option has already been enabled.

Clear Cache for Specific Page
Clear Cache for Specific Page

We occasionally need to clear a page’s cache, but clearing the entire cache is not good for CPU. For this…

Ready to get started?

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