Leverage Browser Caching - Drupal 8

by mike_g   Last Updated January 11, 2018 20:07 PM

I'm trying to Leverage Browser Caching for my Drupal 8 site. I saw many posts regarding it but whenever I enter information into .htaccess file, theres still no difference in testing. Here is my code right now.

 # Requires mod_expires to be enabled.
 <IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On

 # Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600

<FilesMatch \.php$>
# Do not allow PHP scripts to be cached unless they explicitly send cache
# headers themselves. Otherwise all scripts would have to overwrite the
# headers set by mod_expires if they want another caching behavior. This may
# fail if an error occurs early in the bootstrap process, and it may cause
# problems if a non-Drupal PHP file is installed in a subdirectory.
ExpiresActive Off

Used the following link for reference but still nothing.

Leverage browser caching issue

Using Apache 2.4

Tags : 8 caching apache

Related Questions

Site Down for few minutes after clearing cache

Updated July 07, 2015 12:42 PM

Apache crash on clearing multisite cache

Updated April 15, 2017 11:07 AM

Getting error while installing drupal on XAMPP

Updated May 08, 2017 12:07 PM

Cloudflare "Minify HTML" advisable?

Updated October 08, 2016 09:03 AM

Clean urls not working

Updated August 15, 2017 18:07 PM