Browser cache not working

Browser Caching is not working properly:

- Your server may not have the "expires" module enabled (mod_expires for Apache, ngx_http_headers_module for NGINX)
- Another plugin may be interfering with the configuration

If re-checking and restarting does not resolve, please check with your host or open a support ticket with us.

Please find bellow a list of modules enabled on the server:

Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
file_cache_module (shared)
cache_module (shared)
cache_disk_module (shared)
reqtimeout_module (shared)
filter_module (shared)
substitute_module (shared)
deflate_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
expires_module (shared)
headers_module (shared)
setenvif_module (shared)
version_module (shared)
proxy_module (shared)
proxy_connect_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_fcgi_module (shared)
proxy_scgi_module (shared)
proxy_wstunnel_module (shared)
proxy_ajp_module (shared)
proxy_balancer_module (shared)
proxy_express_module (shared)
slotmem_shm_module (shared)
ssl_module (shared)
lbmethod_byrequests_module (shared)
lbmethod_bytraffic_module (shared)
lbmethod_bybusyness_module (shared)
lbmethod_heartbeat_module (shared)
mpm_event_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
negotiation_module (shared)
dir_module (shared)
actions_module (shared)
alias_module (shared)
rewrite_module (shared)
pagespeed_module (shared)

Also please find bellow Htaccess:

# BEGIN Adaptive Images
#=======================

<IfModule mod_rewrite.c>

RewriteEngine On

# Watched directories
RewriteCond %{REQUEST_URI} /assets/uploads [OR]
RewriteCond %{REQUEST_URI} /assets/themes

# Redirect images through the adaptive images script
RewriteRule \.(?:jpe?g|gif|png)$ /assets/plugins/adaptive-images/adaptive-images-script.php [L]

</IfModule>

# END Adaptive Images

# BEGIN Adaptive Images
#=======================

<IfModule mod_rewrite.c>

RewriteEngine On

# Watched directories
RewriteCond %{REQUEST_URI} /assets/uploads [OR]
RewriteCond %{REQUEST_URI} /assets/themes

# Redirect images through the adaptive images script
RewriteRule \.(?:jpe?g|gif|png)$ /assets/plugins/adaptive-images/adaptive-images-script.php [L]

</IfModule>

# END Adaptive Images
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

# END WordPress
# BEGIN WP-HUMMINGBIRD-CACHING

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0

<FilesMatch "\.(txt|xml|js)$">
ExpiresDefault A691200
</FilesMatch>

<FilesMatch "\.(css)$">
ExpiresDefault A691200
</FilesMatch>

<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$">
ExpiresDefault A691200
</FilesMatch>

<FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
ExpiresDefault A691200
</FilesMatch>
</IfModule>

<IfModule mod_headers.c>
<FilesMatch "\.(txt|xml|js)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>

<FilesMatch "\.(css)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>

<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>

<FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>
</IfModule>
# END WP-HUMMINGBIRD-CACHING

#Custom Gzip Compression for svg
AddType image/svg+xml .svg
AddOutputFilterByType DEFLATE image/svg+xml

  • Predrag Dubajic

    Hey Melissa,

    Hope you're doing well today :slight_smile:

    Have you tried disabling your plugins to check if there are any conflicts with HB on that end and that are blocking caching?

    Also, how HB works is that it writes required rules for browser caching in your .htaccess file, however some hosting companies have these values predefined on their server setup and don't allow them to be change via .htaccess rules.
    Can you check that with your host and make sure that browser caching rules can be defined via .htaccess?

    Best regards,
    Predrag

  • Adam Czajczyk

    Hello Melissa!

    Could you please edit the .htaccess file? Try replacing this part of code:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0

    with this one:

    <ifModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 1 seconds"
      ExpiresByType text/html "access plus 1 seconds"
      ExpiresByType image/gif "access plus 2592000 seconds"
      ExpiresByType image/jpeg "access plus 2592000 seconds"
      ExpiresByType image/png "access plus 2592000 seconds"
      ExpiresByType text/css "access plus 604800 seconds"
      ExpiresByType text/javascript "access plus 216000 seconds"
      ExpiresByType application/javascript "access plus 216000 seconds"
      ExpiresByType application/x-javascript "access plus 216000 seconds"
    </ifModule>
    <ifModule mod_headers.c>

    and right above the

    # END WP-HUMMINGBIRD-CACHING

    add this code:

    <ifModule mod_headers.c>
      Header unset ETag
    </ifModule>
    FileETag None
    <ifModule mod_headers.c>
      Header unset Last-Modified
    </ifModule>

    Let me know if that helps please. Also, before you make any changes to the .htaccess file make a copy of it so you were able to restore current one in case changes broke your site.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.