I'm trying to leverage the browser cache for my Drupal 8 site. I saw many posts regarding it, but whenever I edit the .htaccess file, there is still no difference in testing. This 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 </FilesMatch> </IfModule>
I read Leverage browser caching issue, but I still don't get it to work.
I am using Apache 2.4.
httpd -M | grep expire [Thu Jan 11 15:27:29.472962 2018] [core:warn] [pid 11677] AH00114: Useless use of AllowOverride in line 173 of /etc/httpd/conf/httpd.conf. expires_module (shared)
Cache-Control:max-age=0, no-cache, no-store Connection:keep-alive Content-Encoding:gzip Content-Language:en Content-Length:11829 Content-Type:text/html; charset=UTF-8 Date:Thu, 11 Jan 2018 22:50:43 GMT Expires:Thu, 11 Jan 2018 22:50:43 GMT