Hi I have tried adding browser caching to my htaccess. I placed the following code into my htaccess:
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
#ExpiresDefault A1209600
ExpiresByType text/css "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresDefault "access 1 month"
<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>
My questions are: Is this the right code for browser caching? I checked google page insights but the results show that it detects no browser caching even though I've added the code above. So there must be something wrong in the code.
Can anyone please help? Thanks so much in advance!